The way the IRS looks at is as follows:
If the child lives with you for more than 6 months out of the year, and you provide the larger percentage of the financial support of the child,
and it is stated in your divorce decree that you are allowed to claim them as a dependent on your taxes, then you get to claim the child.
If there is nothing in the divorce decree stating who claims the child, then the parents of the child need to come to some agreement on who claims him/her. That's where the "6-months" rule comes in - if the child lives with you for more than 6 months, and you receive little to no financial support for the child, then
according to the IRS, the claim for the dependent is yours. However, I've seen situations where parents split the claim for the child (mom claims one year, dad claims the next), regardless of the living arrangements or child support paid. But those situations are based on an agreement between the parents, or written into the divorce decree.