Eyepieces work by magnifying the light focused by the telescope's primary mirror or objective lens. Every telescope eyepiece has a specific focal length (given in millimeters), and the shorter this figure is, the higher the magnification. To calculate the magnification provided by any particular eyepiece on any telescope, divide the telescope's focal length by the focal length of the eyepiece used. For example, a 1000 mm focal length telescope (say, a 100 mm refractor of f/10, or a 200 mm Newtonian of f/5) will deliver a magnification of 100 with a 10 mm eyepiece (1000 divided by 10 = 100).
Although any telescope can give impressively high magnifications using short focal length eyepieces, there is a point when increasing magnification will provide a worse image rather than improve it. When an object is magnified, its brightness is reduced as the finite amount of light is spread over a larger area. In addition, increasing magnification exacerbates the amount of atmospheric turbulence visible; therefore, high magnifications can only be used when seeing conditions are good. Finally, high magnification is practical only with driven telescopes. Otherwise, the object will quickly drift out of the field of view.
As a guide, your highest power eyepiece should deliver a magnification double the telescope's aperture in millimeters — for example, 200x on a 100 mm telescope, 400x on a 200 mm telescope, and so on.
It's best to have at least three good quality eyepieces that deliver low, medium and high magnifications — say around 50x, 100x and 200x. Taking as an example a 100 mm f/10 telescope, those eyepieces would be of 20 mm, 10 mm and 5 mm focal length. Let's assume that these particular eyepieces are of the commonly used Plossl variety. A field of view around one degree across (an area of 0.8 square degrees) is given by the 20 mm eyepiece — ideal for sweeping the deep skies and finding objects. The 10 mm eyepiece will just take in the half-degree diameter moon and have a field covering just one-quarter that of the 20 mm eyepiece. With its high magnification, the 5 mm eyepiece has a field of view covering just one-sixteenth that of the 20 mm eyepiece and can only be used when seeing conditions allow.