Pragmatics is a subfield of linguistics and semiotics which studies the ways in which context contributes to meaning. Pragmatics encompasses speech act theory, conversational implicature, talk in interaction and other approaches to language behavior in philosophy, sociology, linguistics and anthropology.Unlike semantics,
which examines meaning that is conventional or "coded" in a given
language, pragmatics studies how the transmission of meaning depends not
only on structural and linguistic knowledge (e.g., grammar, lexicon,
etc.) of the speaker and listener, but also on the context of the
utterance, any pre-existing knowledge about those involved, the inferred
intent of the speaker, and other factors (Wikipedia). in short we can say that pragmatics is all about the language usage to communicate in certain background of situation.
I'm not saying much, but for further discussion about pragmatics. here is a pdf file of a goodread book written by
George Yule "Pragmatics".