Synthetic oil processes have been around for some time. A base oil material derived from crude oil is subjected to a process that breaks down and reforms those hydrocarbon compounds into more uniform oil compounds, with better lubricating quality and more resistant to breaking down under the high temperatures found in an engine. But both regular and synthetic oils are fundamentally hydrocarbon compounds, so they do contain carbon, locked up chemically within the compounds. However, the synthetic oils are more chemically stable than regular oils. More info on the subject can be found here:
https://en.wikipedia.org/wiki/Synthetic_oil
and elsewhere. A simple search tells you far more than you want to know.