Oil sands are formed from the remains of organisms that lived in marine environments and were buried under sediment. Over time, the organic matter was converted into petroleum.