I have read about Cartesian, polar, spherical polar and cylindrical coordinates. All these are generalized coordinates. But many a times they are written as general curvilinear coordinates. And I have also read that both are different. Then what is actually the difference?
One difference arises when you have constraints.
Let's say that we constrain a particle constrained to live on a sphere of radius $R$. I could describe this system in Cartesian coordinates $x,y,z$ with the constraint $x^2+y^2+z^2=R^2$.
Alternatively, I could describe the system with just two generalized coordinates (say the angles $\theta,\phi$) and no constraints. In this description, the comstraint doesn't appear explicitly because we chose coordinates that live purely on the constraint surface.
I would reserve curvilinear coordinates to refer to non-Cartesian coordinates in flat space, so for example $r,\theta,\phi$ (not just $\theta,\phi$). Note we could also describe the particle on a sphere using these three curvilinear coordinates plus the constraint $r=R$ (which is easy to solve :-)).