Most employees think of a contract as something that protects them from getting fired for no good reason. They don't think of it as something that also legally binds them to a job they might decide they hate.
Unfortunately, some employers do include clauses in their employment contracts that penalize employees who leave before a contract's term has expired. This is particularly common in certain industries, like broadcasting. Someone who signs on for a year's work is generally stuck working that entire year -- even if they hate the job -- unless their employer agrees to let them leave without paying a hefty penalty.
What happens when you really want out anyhow? Is there any way to leave?
1. Is there any provision for early termination in your contract?
Some contracts will still allow employees to leave a job if they give an appropriate notice. If so, that's likely to be an easy way out of the situation.
2. Is it actually possible to complete the contract?
If there is no possibility that the contract can be fulfilled, you may be able to terminate the contract. For example, if the funding falls through on the project you were hired to develop that might be enough to make your job impossible to complete.
3. Did your employer misrepresent something critical?
If your employer misled you either accidentally or on purpose, you may be able to legally escape the contract. For example, if you were promised a specific job benefit that's not actually available, that could be a mistake that allows you to end your employment without penalty.
4. Did your employer do something to breach your contract?
Read the terms of your contract very carefully. If your employer isn't meeting its terms, then the contract has likely already been broken -- which can give you a convenient way out.
In the end, many employers are willing to negotiate with employees who want to leave -- because unhappy employees aren't generally the most productive. However, if you're hard to replace, that isn't something you can count on. In those circumstances, it's best to consider all your legal options.