Pragmatics is the study of meaning in language in a particular context, meaning the place where the thing is said, who says it, or the things that you have already said. Also, pragmatics studies how people speak when they both know something.
Pragmatics also studies how people speak not literally, but in an indirect way, and why even though this is the case, people can still understand each other. It also studies how people can understand each other even if the words are ambiguous.
The ability to understand what someone intends to tell you is called pragmatic competence.