What produces the radio waves from a pulsar, and why do they form beams?