Leg side, on side

Imagine a line running from the boundary at one end, passing through middle stump of the nearest wicket, straight down the pitch, through middle stump of the other wicket and going on to the opposite boundary. When the striker is at the crease waiting for the ball to be delivered, the side of that imaginary line on which he does not hold his bat is the on side. It follows that the on side will change depending on whether the batsman is right or left-handed.
The name may perhaps derive from the old days of horses and carriages - the on side being the side on which a horse is mounted or a carriage entered from the pavement.