First----who did the children live with? The IRS cares about physical custody. As far as the IRS is concerned, the custodial parent is the parent with whom the children spent the most nights during the tax year--at least 183 nights.
Are you the custodial parent? Do you have an agreement with the other parent to allow the other parent to claim them--due to divorce or that you live apart and share custody? Did one of you sign a Form 8332?
If there is a signed 8332 then the custodial parent retains the right to file as Head of Household, get earned income credit and the childcare credit. The non-custodial parent gets the child tax credit for children under the age of 17.
As far as the IRS is concerned, the custodial parent is the one with whom the child spent the most nights during the tax year--at least 183 nights.
If someone else claimed your dependent already, then your e-filed return will be rejected. Print, sign and mail your own return which claims your dependent. Mailed returns are processed differently by the IRS. It will take some time (maybe even up to a year) but eventually the IRS will contact both parties and sort out who could rightfully claim the dependent. The person who wrongfully claimed the dependent will face repayment of refund $, plus penalties.
When you mail a tax return, you need to attach any documents showing tax withheld, such as your W-2’s or any 1099’s. Use a mailing service that will track it, such as UPS or certified mail so you will know the IRS/state received the return.