The eyepiece is the part of a telescope that most changes the view and is most often left as whatever came in the box. It sets the magnification, most of the field of view and much of the comfort, and it is the cheapest meaningful upgrade available to any owner.
Focal length sets magnification
Divide the telescope's focal length by the eyepiece's. A shorter eyepiece gives more magnification in the same instrument. That is the whole relationship, and it means an eyepiece behaves differently in different telescopes: a 10mm gives 30x in a 300mm instrument and 120x in a 1200mm one.
Barrel sizes, which matter more than people expect
Two sizes are current: 1.25 inch, which is standard, and 2 inch, used for long focal length wide field eyepieces. An older 0.965 inch fitting appears on cheap and vintage telescopes and is obsolete: it limits you to poor eyepieces and vignettes wide fields, and an adapter is worth buying immediately.
What set to actually own
Three eyepieces cover almost everything: a low power for finding and for large objects, a medium for general viewing, and a high power for planets and double stars. A barlow can stand in for the high power one. Beyond three the returns fall off quickly, and one good eyepiece beats three mediocre ones.
Questions people ask about telescope
What eyepiece do I need for my telescope?
A low, a medium and a high power, chosen so the highest gives no more than about two times your aperture in millimetres. Beyond that you are magnifying blur.
What size eyepiece fits my telescope?
Almost certainly 1.25 inch. Larger instruments often also take 2 inch for wide field use, and anything with a 0.965 inch focuser should be adapted.
Are expensive eyepieces worth it?
Up to a point, clearly: better eye relief, wider fields and sharper edges. Past mid-range the gains are at the edges of the field, and in a slow telescope even cheap eyepieces perform well in the centre.