X type capacitors are capacitors connected across two phases. X type capacitors are used where damage to the capacitor will not result in a electric shock.
Y Capacitors are used between a phase and the chassis (ground) of an equipment. Y capacitors are used where the failure of the capacitor will lead to an electric shock if a proper ground connection is absent.
X capacitors are classified into X1, X2 and X3. The classification of these capacitors is based on the peak voltage, the capacitor can withstand. X1 capacitors can withstand 4000 volts. X2 capacitors can withstand 2500 volts while X3 capacitors can withstand 1200 volts.
Y capacitors are classified into Y1, Y2 and Y3 and Y4. Y1 capacitors can withstand 500 volts. Y2 capacitors can withstand 300 volts. Y3 and Y4 capacitors can withstand 250 and 150 volts respectively.
X capacitors are usually made of polyester, ceramic, polypropylene and paper. Y capacitors are usually made of ceramic and paper.