system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How are we able to build oil rigs and other infrastructure under the ocean?
gpt
There are a number of different types of 'oil rigs' in the ocean. In relatively shallow water (less than 200 feet, or so) we can use 'jack up rigs'. These are triangular shaped floating vessels with long legs on the three corners. When the rig is where we want it to be, we jack the legs down to the bottom of the ocean and lift the vessel above the water 25 to 50 feet. We then drill wells from that platform. When we are finished we jack the legs back up, lowering the vessel back to the water where it can be floated to a new location. 
Drill ships are ships that have drilling rigs on them. They can work in very deep water. The ship is floated to the location where the wells are to be drilled then anchors are taken out from it in all directions and dropped. The anchor cables are attached to machines that pull or slack the cables as necessary to keep the ship in one place, even in high winds or heavy seas (big waves). This is called dynamically positioning.
Some wells are drilled from platforms that are giant structures that are floated out to the spot where the wells are to be drilled and then stood up and anchored to the sea floor. These can be as tall or taller than the largest buildings on earth. 
There are other methods that are a hybrid of these or similar in some ways. All of them are very expensive and require lots of engineering.