Pilonidal sinus occurs due to the return of hair into the tissue. Then a cyst containing hair and pus is formed, which becomes painful if infected.