Various types of microscope eyepiece are found of the range of typical instruments. Each has its own characteristics and implications when used in conjunction with a camera.
A typical dissecting type microscope used by schools, perhaps with a 20x magnification, normally has a monocular eyepiece. Hand-held basic digital cameras images can be used to obtain useful and educational images merely by placing the lens of the camera firmly against the eyepiece. Reasonably sharp images can be obtained if the microscope is reasonably massive and stable, and the camera id mounted on a small tripod.
Some high eyepoint eyepieces may provide an image that fills the camera's field of view, but others may require that the camera's lens is held a small distance away from the eyepiece. In the latter case, a light-proof spacer of the correct thickness must be custom made. Rubber eyecaps on eyepieces may fit snuggly around a camera's lens, but may also be removable.