In perpendicular recording, the magnetic bits are oriented perpendicular to the disk surface. This is achieved using a soft magnetic underlayer that enhances the magnetic field used to write data. The stronger magnetic field allows for smaller and more stable bits, which are essential for high-density storage. The writing head produces a magnetic field that switches the direction of the bits, allowing data to be recorded.