You can connect two sections of metal piping by soldering or welding them together, but pipes connected in this way are very susceptible to bursting at high pressures. A way of connecting two sections of pipe more securely is by having flanged ends that you can connect with bolts. This way, even if gases or liquids build up to high pressures inside the pipe, it will often hold with no problem.
In order to connect two sections of a large, enclosed area, it is often best to used flanges and bolts. An example of this is the connection between the engine and the transmission in an automobile. In this case, both the engine and the transmission contain a number of moving parts that can easily get damaged if they get dust or other small objects inside of them. By connecting the outer casings of the engine and transmission in this way, engineers protect the inner workings of both.
Flanges have a specific purpose in cameras and other electronic devices. Though flanges in such items do not usually have to sustain high pressures, they do have to hold tight so they can keep out harmful particles. These flanges are usually found connecting two different materials, such as the glass of a lens and the rest of the body of the camera.