Pragmatics is concerned with the practicalities of language (the adjective ‘pragmatic’ is usually used to indicate that someone or something is practical and sensible in nature).
We often talk about pragmatics as opposed to semantics, and a discussion of the pragmatics of a text, extract or utterance usually comes into play when the full intended meaning is somehow different from or more than the literal and surface meaning of the words used.
For example, telling someone “I like that top you were wearing yesterday” may simply be a delayed compliment, but if the exchange runs like this:
A: Do you like my new top?
B: I like that top you were wearing yesterday.
it’s clear that in fact B is attempting to save A’s face (see face theory on this page) by offering a compliment rather than baldly replying “Not really”, which would definitely threaten A’s positive face.
But it’s not just about face. Issues of pragmatics are important in social relationship, but can also be used for economy, or even for humour. For example, sarcasm and verbal irony rely on the hearer understanding that the speaker means the opposite of the words uttered.
Implicature and inference are also part of pragmatics - implicature being used by the speaker, and inference by the hearer. Common reasons we employ pragmatics are:
Sarcasm (What time do you call this?)
Shared knowledge (Tell me you didn’t just do a Laura!?)