Question: how does electromagnetic wave generated?
Answer: Electromagnetic waves are produced whenever electric charges are accelerated. This makes it possible to produce electromagnetic waves by letting an alternating current flow through a wire, an antenna. The frequency of the waves created in this way equals the frequency of the alternating current.