Petroleum engineering is a branch of engineering that studies the processes involved in producing hydrocarbons, such as crude oil or natural gas.