Radar works by transmitting radio waves, some of which are reflected off objects - ships and lanes. The reflections can be analysed to estimate accurately the distance and direction of the ship or aircraft, and even the model of ship or plane.
Stealth craft have several features to make them harder to detect. Their surface is made of 'radar absorbing material', and their engines are shielded to hide their heat signature. The most striking feature however, is that their surfaces are built up of long straight panels. Most craft have curved surfaces, reflecting radio waves in a variety of directions, at least some of them back to the radar station which can detect them.
The long flat surfaces of stealth craft will reflect essentially all of the incident radio waves away from the source: a stealth fighter can appear indistinguishable from a small bird.