The electric and magnetic fields are confined to the surface of the waveguide. In this context, TE and TM modes refer to the different types of electromagnetic waves that can propagate in the waveguide.
In the TE mode, the electric field is perpendicular to the direction of propagation, while the magnetic field is parallel to the direction of propagation. In contrast, in the TM mode, the magnetic field is perpendicular to the direction of propagation, while the electric field is parallel to the direction of propagation.
In the TE mode, the electric field is transverse to the direction of propagation, while in the TM mode, the magnetic field is transverse to the direction of propagation.