Terminating the Contract-Rule #1
The issue of how to go about terminating the contract should be addressed in the contract itself. It can be agreed that either side can terminate the contract with a certain amount of notice in writing. The more complicated issue is what one considers a valid reason for termination.
For the homeowner, reasons might include abandoning the job (not showing up for a certain amount of time), substandard work as determined by an outside inspector, failure to comply with building codes or the pulling of permits, unreasonable delays (as determined by another contract provision), etc..
The contractor may find that the homeowner is causing delays, has unreasonably hired outside parties to perform aspects of the job, is contracting directly with subcontractors or making unreasonable demands of employees, is expecting work beyond the scope of the contract without being willing to pay for change orders, etc.
As you can see, the list is extensive. Although it is impossible to anticipate everything that may go wrong, the parties can attempt to define what constitutes reasonable grounds for terminating the contract. This can prevent numerous problems down the road.