p orbitals are spheric, thus, they have only one way to overlap and they can only form sigma bonds. However, p orbitals (lobed shape) can overlap in two ways:
If two p orbitals overlap end-to-end, they form a sigma bond.
If two p orbitals overlap side-by-side, they form a pi bond.