Using high intensity beams of fast electrons, the transmission electron microscope (TEM) and scanning transmission electron microscope (STEM) enable comprehensive characterization of rocks and minerals at micrometre to sub-nanometre scales. This review outlines the ways in which samples of Earth and planetary materials can be rendered sufficiently thin for TEM and STEM work, and highlights the significant advances in site-specific preparation enabled by the focused ion beam (FIB) technique. Descriptions of the various modes of TEM and STEM imaging, electron diffraction and X-ray and electron spectroscopy are outlined, with an emphasis on new technologies that are of particular relevance to geoscientists. These include atomic-resolution Z-contrast imaging by high-angle annular dark-field STEM, electron crystallography by precession electron diffraction, spectrum mapping using X-rays and electrons, chemical imaging by energy-filtered TEM and true atomic-resolution imaging with the new generation of aberration-corrected microscopes. Despite the sophistication of modern instruments, the spatial resolution of imaging, diffraction and X-ray and electron spectroscopy work on many natural materials is likely to remain limited by structural and chemical damage to the thin samples during TEM and STEM.