Electromagnetic waves transfer energy from a source to an absorber. The source gives out the waves and the absorber takes in the waves and gains energy. The waves carry energy but they do not carry matter from one place to the other.
The Sun is the source of visible light and infrared. When this radiation is absorbed by the ground, the ground warms up, so its thermal energy store increases. In a microwave oven, microwaves are absorbed by water in the food, which makes the food hot. Infrared from a fire makes your skin feel warm.
Radio waves work in the same way. A transmitter is the source, and the energy is absorbed by a receiving aerial. X-rays are absorbed by bone more than by soft tissue, which is how they can make images of the body.