There's freelancing and consulting. Freelancing is just you, by yourself, finding gigs, selling yourself, doing the work, invoicing clients etc. I guess freelancing is technically consulting.
Then there's contracting, where you go and find a contract job which is advertised for X months and $Z by an employer or 3rd party and you work that. That's what I'm doing now and it's pretty good money.
A consulting job (in my mind) is where you get a job at a firm which does all the client engagment, marketing, invoicing etc, and you just do the work. You could work at a consulting firm as a full time employee or a contractor, since their need for staff fluctuates.
If you have the skills and need some short term work, look out for short term contracting gigs being offered by consulting firms - they pay pretty well and they're on the market because there's a pertinent need to get a bum between a seat and a keyboard as soon as possible. For example - my current job is as a contractor working for a consulting firm which is engaged with a government agency. The firm promised the agency a warm body for X months, but for strategic reasons the firm wants to move that person elsewhere. That's where I come in. They hire me for three months so they can reallocate their employee while keeping their existing obligations. In circumstances like that, price isn't the main issue.
The other is to be a freelancer. Then you are dependent on contracts, and you lack a lot of benefits (no guaranteed salary, no extra benefits). On the other hand, you should make a lot more money. As a freelancer, you can either work with a firm that handles the sales and account management for you, or you can try to find clients on your own. The first one has the benefit that you work with (hopefully) experienced sales people that can do the sales and contract work for you, but they can take anywhere between 10% to 30% of your rate as a commission.
Doing sales yourself is the most flexible and you likely earn the most, but I would not recommend doing it unless you have a solid contact network already. Sales is often a difficult and tedious work, and that's not always fully understood or appreciated by consultants.
I have not worked with Fiverr or Upwork, but I don't see them as a serious alternative. Too short contracts that are not paid nearly well enough. They might be nice for students that want to make a bit of extra income though.
Source: I've been a consultant and a freelancer for nearly a decade
I think people conflate consulting, freelancing and contracting. In the context of "quitting your job" to go "work on your own", we can treat them as the same thing.
This is what I do, so it's merely anecdotal: there are many companies out there that cannot afford and/or do not have the need for a full-time, technology-savvy employee (data scientist, programmer). But they do have a need for tech solutions. I've had luck in finding small businesses that have $25k-$50k annual budgets for technology solutions; reporting, automation, small mobile apps, process streamlining. 4 or 5 of those in rotation, in a low cost of living part of the country (where skills are less abundant) and you're doing alright. The fact that you're equivalent to, essentially, a sub-$50k salaried person means timelines and expectations are utterly reasonable. After all, it's nigh impossible for these companies to find a substitute. Other bonuses include being able to define your workload and schedule, as well as seek out interesting work.
Is this consulting, contracting, or freelancing? I don't know, probably a bit of all 3.
I joined it as my first job after graduating. I was expert in nothing but was billed as one straight from day 3. Excellent way to learn as a motivated junior, assuming the company cares and places you among seniors who know what they are doing. For senior people independent freelancing is way better deal monetarily.
Most of the time, you make money consulting to people you worked with, directly or indirectly, previously. To make consulting work, you need to offer a specific, deep skill that is not widely available. This can include specific systems or toole, specific markets, specific deployments, and so on. This is specifically why Upwork and Fiverr don't make any sense - no one who hires someone to do consulting is going to look on either for highly skilled hires and likely wouldn't take seriously anyone who was on them.
Unfortunately, this does mean that doing consulting prior to getting career experience and building out your network is quite difficult and has a very different earnings profile than it would otherwise.
Being close to the customer helps in finding these gigs, especially vendor-side.