The court will determine alimony or spousal support on a case by case basis. The laws are very general as to what a judge must decide in such cases. The Institute of Continuing Legal Education explains the final decision about how long you will pay alimony is up to the judge in your case. He or she will consider a variety of factors and could make a few different decisions. 

There are two general types of alimony. The court may decide to award permanent spousal support. This means that you will make payments until your ex-spouse dies or until something happens to void the order. For example, if your ex-spouse remarries, it ends the support order. All support orders end when one of you dies, as well. 

The court may award permanent alimony if your ex-spouse has a disability and cannot support him or herself, if you where the one who earned the only income in the marriage and you were married for quite some time or if the differences between your earning capabilities are quite large. Also, if you were married for a long time and your ex-spouse was a homemaker, then the court may also find this is a valid reason to award this type of alimony. 

The other types of spousal support is rehabilitative. This is more common because it is a type of temporary assistance the judge orders to help your ex-spouse be able to start earning enough income to take care of his or her own needs without money from you. There is usually a set end date for this type of support. 

This might happen if your ex-spouse needs to gain skills to enter the job market. It may also happen if there will be a huge change in lifestyle due to the divorce for your ex-spouse. It gives him or her time to adjust to the change. It may also happen if your ex-spouse worked to put you through college and now wants to earn a degree.