The effect of a magnetic field on the transition layer between a plasma and an absorbing wall is studied. A numerical model is used which simulates the motion of plasma particles in the electric and magnetic fields for a prescribed particle influx at the plasma boundary. Bohm’s condition for the existence of a monotonic profile of the layer is generalized. The transition layer proves to have a double structure comprising a quasineutral magnetic presheath preceding the electrostatic Debye sheath. The magnetic presheath scales with the ion gyroradius at the sound speed and with the angle of the magnetic field. The total electric potential drop between plasma and wall proves to be fairly insensitive to the magnitude and angle of the magnetic field.