1. What one needs: ideally, you have a significant other (SO) -- I know it's damn hard to get one but let's first understand why a SO is the number one fix for loneliness. The SO is somebody no one else can replace, even not your best friends. Why? There are many reasons but the most important is that we all require a lot of communication and interaction with like-minded people to be happy -- this is one of our core needs and if this is lacking just one (!) day we get depressed. A SO fulfills those communication and interaction needs much better than any other person because the quantity of communication with your SO can be very high while the quality can be low. So, what does it mean? You can call your SO anytime and tell her really minor stuff like 'they have awesome apples in the store, shall I get some?' or when going to bed you can talk about how the day went, that traffic today was a pain or you show her some funny posts on Reddit. Just imagine how many words of unimportant communication you exchange with an SO in a week vacation. All this sounds nitty-gritty and totally irrelevant, but the SO is 'always-on', will listen to any crap and this is something we terribly need. And you can't call or text your best friend or close co-workers before going to bed to tell them that today's apples were really juicy. Moreover, we get other amenities like sex or endearment.
2. If no SO is present then the next thing you need to not feel lonely are good or very good friends or let's call them best friends, people who you really connect to. To find those is as hard as finding your SO and usually you don't get that a person is about to be your best friend before meeting him/her over a long period of time. But 'best friends' won't stay -- it doesn't take too long and the connection you had with them loosens up but you still stick to them (because they 'are' your best friends), so don't spend too much time on finding the 'best' friend, any friend will do. However, best friends are important but can not replace a SO.
3. The next level of people you need or are rather nice to have are close or like-minded co-workers. But this is something you shouldn't aspire for and those connections are very fragile/dynamic because work and life sometimes doesn't play well together and disappointment is hard-wired. Still, best friends can be won from co-workers.
So, we know now what we need, let's now find an answer to the question how to get there.
Finding a SO is very hard and the best way is to go out and create as many leads as possible -- very helpful is the PUA literature, just google it and find tons of wisdoms. A lot of stuff is crappy but you will find as much excellent advice there. And don't think that good looks is the key to find your SO, it makes life a bit easier but it's definitely not the key.
Similar to before you should go out and meet many, many people -- very good for this are meet-ups.
But the most important thing: you should NEVER go out and look for the SO or the best friend. This doesn't work and makes you ultra needy and people will find you awkward. Simultaneously, you will be disappointed because everybody you meet seems to be a douche, so start slowly and don't expect wonders. Connect to MANY people and try to keep relationships superficial, slowly intense those relationship which look promising but look that you still connect to MANY people because most people won't match (for being a SO or best friend). A hint: good matches are usually your close peers, people who are in similar situations, contexts and/or face same challenges. However, to have a good evening often you do not need a best friend (of course it's better and more convenient to have one) but sometimes just some random people work out too. What can also help: find a personal mission you pursue which is NOT 'finding best friends', starting a startup, a meetup, whatever -- to create a relationship you need always some hook.
And then after few months everything will come by itself. It's definitely some work involved but everybody can master it, even the introverts (which is just often a weak excuse).
To survive the lonely times before -> exercise every day, eat and live well and most important, stop any kind of drugs, they make your lonely times even worse.
A side note regarding founders, when starting their business entrepreneurs have a hard time but this struggle will be rewarded in future and feeling lonely is often part of the job.