SEM detects electrons that reflect off the surface of the sample. TEM detects electrons that passed through the sample. This is useful if you are having trouble understanding concepts like “scanning” or “transmission”. SEM can show the surface of the sample while TEM can show the inside (sometimes even down to individual atoms if the TEM quality is high and the sample is thin). This figure was made for my co-students, who also had the same question.
Source for microscopic images: Microscopy of Rosette Nanotubes