To give you a bit of an lay of the land before you jump into (or even start researching) consulting.
There's mainly 2 types of consulting: staff augmentation ("staff aug") and engagement-based.
In the first case you simply work for the company the same way FTE (full time employee) would but it's easier for them to lay you off, and they don't have to pay you benefits. You typically would be paid much higher rate than an FTE.
You can either work for yourself, e.g., have a small LLC/S-Corp, or work for a company which matches employers in need of consultants and consultants looking to sell their skills. That company would typically get the percentage of your rate from your customer (this is sometimes referred to as "bodyshop" model).
As others already pointed out, one way to get work as independent staff augmentation consultant is to have an inside knowledge of a particular company and have them pay you for that knowledge. Another way is to specialize in a very narrow technology (e.g., Cobol) and be well known within the industry, and you will have a steady stream of work coming your way (until that technology becomes obsolete or otherwise loses relevance).
For engagement-based consulting work you come into a company to perform a particular project with defined end goals and the budget. You first pitch the project to prospective clients and if you mutually agree on the end goals and the cost, the engagement starts. Engagement-based consultancies have 2 sides to their business: sales side and delivery side. People on the sales side will be working with potential clients, looking for opportunities, pitching projects, and tending to any issues on the projects that they sold if necessary. People on the delivery side will be... well, delivering the service, or running a project.
Once the project is over, you either have to find a new client, or find a way to extend your engagement with the same client by maintaining or expanding the product you built, expand into the new areas at the same client, etc etc.
Hope this helps.