The first number is the maximum magnification, how much bigger the object will appear to be. So the first telescope will make things 40x bigger, the second will make it 12x bigger, and the third will make it 10x bigger, at max zoom.
The second number is the diameter of the primary lens (or mirror) in millimetres, which describes how much light it is actually capturing. This will make objects such as the moon appear clearer. When it comes to viewing stars, the larger the lens, the dimmer stars you’ll be able to see, and you’ll be able to see more stars as two distinct objects when they would otherwise ‘blend’ into one.
Generally the telescope should say it’s intended use, but really the only benefits of telescopes with smaller numbers is they’re cheaper and lighter. A larger telescope will (assuming its manufacturered to the same standard) provide a better image.
Generally speaking, the larger telescopes will be reflectors, and these are typically meant for stargazing. Smaller telescopes are for casual/beginner use, obtaining a larger field of view when using a larger main telescope, or for terrestrial use (ie spying on your neighbors.
Latest Answers