The two terms -petroleum and oil- are really different. However, it also depends on the way they are used in a sentence or what the speaker might be referring to specifically. The term petroleum is a natural resource that is found in the upper part of the earth strata. When it is being refined, you can obtain several other useful items from it, such as petrol, benzene, Vaseline, kerosene, diesel, and etc.
As a matter of fact, one of the major derivatives of petroleum is the lubricant oil. This can be used as a lubricant for several engines, such as vehicles' engines and so on. Nevertheless, there are several other substances that can be referred to as oil. These include vegetable oil, palm oil, cooking oil, and etc.
The confusing part of it is that another meaning or name of petroleum is crude oil. Some refer to this crude oil as just oil, which should be well addressed so as not to take one thing for another.