It means to curve body and draw up legs: to sit or lie with the body curved and the legs tucked up.
It also means, to feel extremely embarrassed: to be overcome with embarrassment, revulsion, or some other strong feeling (informal).
I took this definition from Microsoft® Encarta® Encyclopedia 2009.
2nd meaning.- When I realized my mistake I just wanted to curl up and disappear.
Another example, "to curl up with a good book"