Question: how electromagnetic waves are produced by oscillating charges?
Answer: Electromagnetic waves can be produced by accelerating charges. Moving charges produce both electric and magnetic fields. An oscillating charge produces oscillating magnetic and electric fields. Oscillating charge produce both electric and magnetic field.