Hybridized Orbital Theory was developed to correctly account for the geometry of molecules and the bond angles. According to this theory, when an atom forms bonds in a molecule, its atomic orbitals mix together to form hybrid orbitals. Examples of hybrid orbitals are sp, sp2, and sp3.
An sp orbital is formed from the mix of an s and one p orbital.
Sp2 is formed when one s and two p orbitals mix ( px, py)
Sp3 is formed when one s and three p orbitals mix (px, py, and pz)
To correctly determine hybridization, we must fist figure out the steric number.
Steric Number = Number of Attachments + Number of Electron Lone Pairs
When steric number is 2, hybridization is sp
When steric number is 3, hybridization is sp2
When steric number is 4, hybridization is sp3
Exception: When an atom that appears to be sp3 hybridized can participate in resonance, that atom is in fact sp2 hybridized.
P.S. If given bond-line structures you must first add electrons to each carbon to predict your hybridization correctly. If electron pairs are not given either, you need to add them accordingly by knowing that each element wants an octet (eight electrons).