How do I make friends?

Victoria
I need advice. I've never really made friends easily as a kid I experienced a lot of rejection and I just recently realized that it caused me to withdraw from my peers out of low self esteem. Girls were so mean to me. In middle school my "friends" made up a name about me so they could talk about me while I was there without me knowing. They called me P.A.-thetic. That's just one example. So now here am, clueless as to how to relate to people my age. I'm so awkward.  When I get into social situations I get so anxious I can barely function. What makes people want to be friends with a person? What's wrong with me?