I was offered work by a former colleague. In his new job, he had a technical problem which nobody there could solve, but he reckoned I probably could.
I accepted the challenge, and that was the start of my consulting business.
My other customers have all come through word of mouth. Once I made it known that I was available for freelance work, word soon got around amongst people whom I'd worked with, and the phone started to ring.