C + O2 is equal to C + O, how is that possible C + O = CO2 . This is because carbon has valency of 4 while oxygen has valency of 2. When they react the valencies are criss crossed which means we will get C2O4 but this is simplified to CO2. 

But my textbook say that C + O2 = CO2. 

So how is it possible that C + O2 and C + O both get the same product of CO2?

Also you can say that the reaction of C + O = CO2 is not balanced but the balanced chemical reaction would be C + 2O = CO2 not C + O2 = CO2 which is the reaction that my textbook says.
When thinking about chemical reactions it is very important to know which chemicals may react with each other. Jun-Goo Kwak already pointed out the nature of oxygen.

A quick reminder: The ground state of elementary oxygen is the triplet biradical $\ce{o2}$, which is a gas. This is what we have on the surface of the earth. Carbon however comes in many  different forms in nature. The most popular and often is graphite. Other forms include diamond, fullerenes and graphene.
At one point in your life you haw almost certainly come in contact with graphite: coal. As the principle repeating unit is carbon itself, its formula will be written as $\ce{C}$.

As for the binary combination of oxygen and carbon, there are also many different modifications. The most important of them are carbonmonooxide ($\ce{CO}$) and carbondioxide ($\ce{CO2}$). Like Uncle Al stated there are also suboxides known, which are usually byproducts of incomplete combustion (if not targeted explicitly).

Having said all that, if you burn coal, the following main reaction will happen (1):

$$\ce{C + O2 -&gt; CO2}$$

However, given the right conditions (excess carbon) also carbonmonoxide  may be formed (sum of reaction, 2):

$$\ce{2C + O2 -&gt; 2CO}$$

The reaction itself will detour via the Boudouard reaction, which is very important in blast furnace processes. First forming carbondioxide via 2 and then convertin excess carbon to carbonmonoxide via 3:
$$\ce{C + CO2 &lt;=&gt; 2CO}$$