Difference between Across the Line and Line to Earth
X type capacitors are designed not to fail short circuit and hence cause a massive curent flow and risk of fail. Y type caps are there for personal safety and should not fail and thus cause risk to anyone touching the chassis of some equipment: -



X2 and Y2 are a bit smaller and cheaper than the original X and Y capacitors. Here is a fairly user-friendy site that gives more details.