A lens port is the additional tube with a glass or acrylic element on the front that covers your lens and completes the housing.
Without a port, your housing would have a big hole in the front, which isn’t the best idea for an underwater case.
Some housings, like most compact housings, would have a fixed port as part of the housing, so you cannot change ports with it.
The vast majority of mirrorless and DSLR housings, require a port which is usually sold separate, unless part of a package.
Ports are selected according to the lens used. The correct port would be determined according to the manufacturer’s port chart for that housing type. Most lenses require a unique combination of a port and extension to work properly, but sometimes two or more lenses can fit under the same port.
There are two types of lens ports, in general, a flat port is usually for macro lenses and a dome port is for wide angle.
Flat ports, also known as macro ports, will magnify an image by approximately 25%. This is due to the optical refraction ratio of water.
Dome ports, known as wide-angle ports, give you a wider angle view because they are a concentric lens that acts as an additional optical element to the camera lens. The optical element cancels the water’s optical refraction, so that the field of view you get is the same as using the lens above water.