Oil companies hire geologists to analyze subsurface formations and samples during drilling, ensuring the presence of oil and gas. Their expertise helps optimize exploration and extraction, with salaries ranging from approximately $105,327 to $129,715, and a median around $119,085.