The branch of geology that focuses on the exploration and extraction of hydrocarbons (oil and gas) by studying the origin, distribution, and structure of rock formations that can contain oil and gas reserves.