Here's how it works:
There are companies out there who need people who have are a very particular set of skills, skills they have acquired over a very long (or short) career. However, they don't have the budget to hire these specialists locally.
On the other end, there are specialists who have acquired these particular set of skills, but don't know where to find companies that need them.
That's where the freelance sites come in. Their job is to collate all the freelancers that offer services and companies that need them in one place. They're basically matchmakers. But aside from just finding matches, they do other things as well to make sure that the entire process is smooth. For example, a lot of the freelance sites track freelancer hours, serve as arbiters if there are any issues, and manage payments. In doing this, they charge a certain percentage of the transaction (usually 10%). I won't go into too much detail, but someone asked about how the money works, so I'll talk more about that.
When it comes to payments, there can be different kinds of set-ups. With short project based work (Fiverr, projects under $20), you usually get paid one time, upon completion. The freelance site may take payment from the company and hold it until you complete the task and then release the funds to you via Paypal (or bank deposit if you're in the USA) - that's also where they take their fee. Other common set-ups are weekly payments for work that's based on hours and payments upon completion of certain milestones in bigger projects.
I've seen freelancers and companies try to circumvent freelance sites to avoid the 10% fee, but be forewarned - a lot of the times, freelancers get cheated out of their fees when they do this. My advice is to go through freelance sites as much as possible. Part of what you're paying for in the 10% fee is protection for yourself and for the freelance site to help manage any issues that may arise. No matter how nice companies may seem during your interviews or meetings, it's always better to be safe than sorry.