I POD the PP's that mention volunteering and clubs.
Being self-aware is big. Ask yourself - How do I seem to other people?
I had no friends in middle school (6-8th grades). I was very shy and made timid efforts in elementary school. I felt rebuffed at my attempts to make friends and quit trying easily. Looking back - some of it was bullying while some was gentle teasing. So I didn't even try in middle school.
It was hard. I felt depressed fairly often and occasionally angry.
But looking back now there are times I almost wish I could go back to being invisible. One of the things I learned about myself, is that - to myself - I'm a pretty interesting person. I like me. Sure, no one else seemed to but I still did

. Time by myself became necessary. To decompress and to meditate. I had plenty of time to enjoy reading, playing Barbies (yes I played with them 'til I was 17...I loved styling their hair), decorating and redecorating my room on a dime, teaching myself some rudimentary cooking, taking walks, making mudpies (really), going on bike rides, collecting stickers and whatnot.
I tell my own kids two things when it comes to friends and their own personalities: "It's better to have no friends than bad friends" and "Only the boring are bored".
In high school things changed to the extent that people seemed to want to make friends with me and I wasn't interesting in having more than a few friends. Clingy people were 'out'. I wasn't clingy and can't tolerate people like that. At all. However my need for 'alone time' continued to the extent that I would fib and tell my friends I wasn't allowed to go out but in reality I just needed to be alone. It was easy if I was staying home, harder if I went to the mall to go shopping by myself or to the movies all alone. I hoped I wouldn't get caught. It never bothered me if my friends planned stuff w/each other w/o me. If they were doing something with each other I'd think 'great, maybe I'll go the beach...' Having an afterschool job helped tremendously at learning to interact with people and breaking through my natural shyness.
So advice: Enjoy being by yourself by taking up hobbies, volunteering, a job, etc. Make yourself interesting and other people will be drawn to you. Try to learn and apply social cues. Show personal interest but don't interrogate. It's harder to be alone when you're a true extrovert but even extroverts need to take the time to meditate on things.