It depends on the nature of the issue. If it's a licensed contractor, there's a good chance their insurance will pay up with just a letter from the lawyer. If you hired someone who is unlicensed and uninsured, you may still win a case, but you'll likely never collect.
Legal action, by definition, takes place with you, the contractor, and a third party (like a judge) presenting each one's side of a dispute. The third party decides who's "right". To start the ball rolling, you proceed to the courthouse, tell the clerk what you want to do, and the clerk will give you forms to fill out and all the information you need to proceed.
But you knew that, I'm sure.
Since I have to read your mind about the details, I can only give you the broadest of answers.
If the amount of money is small (your decision) go to small claims court and proceed as above.
If the amount of money is significant (your decision), get a lawyer and do not do it on your own. Be prepared to be patient as these things take time. At least a month before all parties are even notified. Then the time required depends entirely on the circumstances of the dispute.