The collimator of an x-ray tube

restricts the diameter of the x-ray beam

focuses the x-ray beam.

prevents secondary radiation

produces a more homogeneous x-ray beam.