I believe LinkedIn automatically define these skills by crawling for keywords in your profile. I've never added a skills section yet every now and then I get emails stating I've been endorsed for a specific skill.
I believe users can also suggest them? I've got a couple on my LinkedIn profile that I didn't add, and weren't there earlier but I got a notification I was endorsed for that skill anyway.
I've had former colleagues offended that I did not endorse them for skills (that I had not witnessed them using, though I knew they used them at that company.)