This question is posed because I would like to understand what stops an Oil Exploration Corporation from setting up a rig in the ocean and collecting oil (assume it is technically possible).
The UN Convention on the Law of the Sea defines something called the "Exclusive Economic Zone" (EEZ) which is the 200 miles off the coast of any country in which they are allowed to exploit and use marine resources. The state owns this, and grants drilling rights to companies who wish to use this area in the same way the government would grant drilling rights on land.
This is not always so cut and dry though, as oftentimes the EEZ of several countries overlap. The South China Sea is particularly contentious.
Technically speaking you could set up a rig in international waters without any sort of government approval, but you also would not have any government support. Obtaining mineral rights from the government close to land seems to have thus far proven more economically efficient than setting up in the middle of the ocean and possibly fighting off pirates.