Lenses that automatically change the maximum lens aperture when the focus length is increased are known as 'variable aperture' zoom lenses.
The other, more expensive type of zoom lens that does not change the maximum lens aperture when the focal length of the lens is increased are known as 'constant aperture' zoom lenses. Constant aperture zoom lenses also usually cost more because they have higher quality optics, and a larger diameter (more expensive glass) to accomodate the maximum aperture at the long end of the lenses focal length adjustment range.
El cheapo, 'fixed aperture' zoom lenses also don't change lens aperture when zoomed, because they only have 1 non-adjustable aperture. Many confuse fixed aperture with constant aperture
It's interesting to look at the math.
Assuming an 18-55 mm f/3.5 to f/5.6 zoom lens:
At 18 mm and f/3.5 the diameter of the lens aperture is - 18 mm (the f in f/3.5) divided by 3.5 = 5.14 mm which is considered a fairly large lens aperture.
At 55 mm and f/5.6 the diameter of the lens aperture is - 55 mm (the f in f/3.5) divided by 5.6 = 9.82 mm which is considered a smaller lens aperture, even though it's actually has a wider diameter than 18 mm @ f/3.5.
Assuming a constant aperture 24-70 mm f/2.8 lens:
Set to 24 mm @ f/2.8 we get a lens aperture diameter of 8.57 mm and at 70 mm @ f/2.8 we get a lens aperture diameter of 25 mm.