First, you’d need to consider which market you’d like to address because this will decide how you acquire customers. Domestic only? Overseas / remote? I’d very much suggest the latter because in general it’ll allow you to charge much higher rates. However, getting and keeping decent overseas customers poses quite a few challenges of its own. Communication is key in that respect. You’ll have to stay in touch with your remote customers via Skype / eMail / chat on a regular basis to keep them happy so take care of the required infrastructure (fast Internet connection, chat tools such as Campfire etc.)
Next, you’ll have to market your business and your expertise. Create a decent-looking website with relevant content that explains what you’re doing and which problems you’re solving. WordPress is great for creating and maintaining a simple business website. Write blog entries about about relevant issues and subjects that concern you. These don’t have to be related to software only. Anything that helps creating a well-rounded picture for your business is great.
It’s important to realize your customers don’t want software they want their business problems solved. Many software businesses succumb to the fallacy that they’re in the business of creating software. If you do that your customers will never take you seriously as a business. They’ll just consider you a cheap IT worker they can pay by the hour. You probably don’t want that so think about which problems you can solve for which customers and address those on your website.
Furthermore, create a portfolio for your work so far. Participate in open source projects. Get your work out on GitHub. Read and contribute on business / hacker community sites such as Hacker News.
How you find customers very much depends on your expertise and local environment. LinkedIn and Hacker News are good starting points.
Once you have your first customer, you should found an actual company. Get a tax consultant / accountant. They can be paid by the hour and save you a lot of trouble. Accounting is the first thing you’ll want to outsource in a software company.