Pragmatics studies how meaning depends not just on linguistic knowledge but also on context. Anaphora refers to expressions that refer to something mentioned earlier in the text, while deixis refers to context-dependent expressions like person, place, and time references. Some expressions can be both anaphoric and deictic depending on what they refer to - if it's something mentioned before, it's anaphoric, but if it locates something in the context, it's deictic. The key difference is that anaphora relies on prior mentions while deixis relies on contextual information.