An annulment is a Church declaration that a couple did not contract their marriage validly, and therefore, they were never truly married. This declaration implies that since the couple was never really married, they are free to marry another. Annulments are necessary because the marriage bond cannot be broken by anything but death (divorce is not permitted, because "what God has joined let no man put asunder" [Matt. 9:6]). Those who separate from their spouse must have their marriage declared null before they can marry another. This is different than a divorce. A divorce claims to actually dissolve the marriage bond, while an annulment claims that there was no marriage bond to begin with. When civil law grants a divorce, moral law does not–those who have been divorced in civil court are still married in the eyes of God.
Some find it hard to believe that a couple could live together for years, even decades, have many children, and were never really married. However, if a marriage is invalid, neither time nor children makes the marriage valid. Do those who do not have a valid marriage commit fornication? In a way, they do commit fornication, but it is not subjectively sinful if they are invincibly ignorant of the fact that they are not truly married.
A marriage is invalid when they do not get married on God's terms. This includes unity, fidelity, indissolubility, and procreation. A man, for instance, who gets married with the explicit intention, at the time of his marriage, of marrying another in the future (polygamy), cheating on his wife if he is attracted to another woman, divorcing her if it does not work out, or refusing to have children, such a man marries his partner invalidly. Annulments can also be granted if either of the partners did not freely consent to marriage, if one of the partners married while he was already validly married and had not obtained an annulment, or if a Catholic marries either another Catholic or a non-Catholic outside the Catholic Church (by a JP, a Protestant minister, etc.–anyone other than a priest) without obtaining a dispensation from the proper authorities. This latter reason is imposed by the Church, and has every right to make this rule. As Jesus told the Apostles, and by extension the bishops who would succeed them and form the teaching office of the Church (Magisterium), "whatever you bind on earth shall be bound in heaven, and whatever you loose on earth shall be loosed in heaven" (Matt. 18:18).