Hi there - A few ways to go about this.
For one, if you are an “outcast” it is actually something to be grateful for! Many people spend their lives trying to be different. You naturally are - congratulations!
When we are younger, this is more of an ill, because people will usually exclude us from things. Many “outcasts” will retreat at this point, further emphasizing their segregation. The secret is - If you own what makes you different, you may get some lashback at first, but then people will start to like and admire you:
“I wish I could be like that”
If not in your teens, then in your adult years. Trust me, the most promising thing is to go all in on yourself. When you do that, it doesn’t matter if anyone likes you or not, because you’re having a good time regardless.
Now to address the lonely part. Feeling lonely is a deep need inside all of us to feel wanted or needed. We have to address what either triggers our loneliness, or what triggers our validation. Do you shut down if a friend doesn’t invite you somewhere? Or do you self-sabotage and not go places because you’re inwardly afraid of rejection? Addressing these points will help solve the problem instead of just the symptom.
Become cognizant of your social habits. I struggled myself a long time with feeling lonely, and consequently - being alone. It sounds very simple, but now I force myself into social situations. When you’re able to surrender whatever insecurities you have in lieu of the life you want to live, you’ll see the world is actually quite gentle and kind. And if you’re an outcast, you actually have it easier. You won’t have as many friends as others - but the truth is, no one really does. Yours are just easier to spot because you find people like you. Much easier when you’re different to spot your “tribe” than when you’re just like everyone else.
Much better to feel lonely and confused for a time, than to feel numb and lost majority.
I hope this helped!