How are x-rays produced?

How are x-rays produced?

Electrons are generated in an x-ray tube and are accelerated toward a high-voltage anode, which has a target that generates x-rays.