This is the study of meaning in language. It is not grammar. It is, however, so closely linked with grammar that, at times, we cannot examine the grammar of a sentence without discussing the semantics. However, I will make every effort, this semester, to separate semantics from grammar or, at least, to tell you when we are dealing with grammar in a way that hinges on semantics. If it were not for the fact that this was my PhD specialization, you could probably get away with forgetting that this word exists.
Most people do.
In the present context, you can probably get away with pretending that it doesn't exist, a sort of semicomforting stance. Pragmatics is a step beyond semantics in its focus on how we achieve various purposes in our linguistic communication. Mostly, it is focused upon spoken conversation. However, there are a few linguistic nerds, desperate for scholarly attention, who insist that it, also, applies to written texts. The other two are more successful than I am.