This is a filter that sits between the mains power line and the SMPS. Its goal is to suppress electromagnetic interference (EMI) and (to some extent) protect the circuit from spikes on the line. The basic structure of such a filter looks like this:
These filters use specially-rated capacitors to handle the high AC voltage. The capacitors used between the hot and neutral lines (inputs 1 and 2, outputs 3 and 4) are called "X-class capacitors", or "X capacitors" for short. The capacitors used between a hot or neutral line and ground are called Y-class capacitors. The X and Y stuff is just a safety rating; it means the capacitors can survive the line conditions.
Also in the filter is a pair of coupled inductors which form a common-mode filter. This allows the differential line voltage through, but blocks any voltage spikes that are on both lines at once.