CO₂ molecule π bonds
Recall the definition of σ-bonds. They are caused by the head-on overlapping of the orbitals. 



$s$ orbitals always, and only form σ-bonds while the $p$ orbitals in the direction of bond axis (which is $p_x$), also form σ-bonds. 

The other two $p$ bonds cannot form σ-bonds as they are perpendicular to the bond axis, and cannot overlap head-on. In such cases, π-bonds are formed, by the sideways overlapping of the orbitals. 



The $p$ bonds not perpendicular to the bond axis involve in π-bond formation ($p_y$ and $p_z$).