Compact = small front ring (easy to pedal but your speed is slower) plus a fairly large front ring, but not as big as a standard large ring so again you don't have as much top speed ability
The benefit of a compact is it's easier to pedal up big hills, down side is that you sacrifice top speed and there is also a bigger gap between the small front ring and the large front ring.
The rest is simply about spacing. 12-25 simply means the smallest cog on the back has 12 teeth and the largest has 25. The bigger the gap between these two numbers means you will find it harder to be in the right gear as some are simply not there. This allows for the bigger cogs to be fit. This kind of setup allows you to have a larger range of cogs, making it easier to get up hills, bare with me...
Imagine you're cycling along a road and you think, oh, I could grab a harder gear than this... if your rear gears are 11-28 for example, you could find that the next hardest gear is just too hard to pedal in because it is too much of a jump.
The following scenario is actually not possible but it will help to explain.
Imagine if the gears were like this:
1-5 and you have 5 gears
Gear No1 = 1 cog. No2 = 2 cogs. No3 = 3 cogs. No4 = 4 cogs. No5 = 5 cogs.
You will notice there is one cog difference between each gear
1-9 and you have 5 gears
Gear No1 = 1 cog. No2 = 3 cogs. No3 = 5 cogs. No4 = 7 cogs. No5 = 9 cogs.
You will notice there is two cogs difference between each gear
For 1-5 you get a smaller range of gears, but they are very close in the number of cogs they have, making it easy to be in exactly the right gear, where as for 1-9 you get a larger range of gears. This will make climbing easier as you have more cogs on the biggest gear, but the downside is that you have a much bigger gap between each gear, you will notice that cogs 2 and 4 are not available at all.
Hopefully that makes sense and I haven't confused you more
