After you file

If both parents claim the same child the first one to e-file will be accepted, the 2nd one will reject that the dependent has already been claimed.  That parent, if entitled to claim, will have to mail file.  

The IRS, within a year or so, will send letters to both parents asking if their tax return was accurate and suggesting that they amend if not.   If neither parent amends, then then IRS will request the parents proof that the child actually lived with them for the required time.   The IRS will evaluate the proof provided and one parent will get to keep the refund, the other will have to pay it back with interest and possible penalties.

School records with your address, medical records with your name/address, other bills, etc. that can show that the child lived with you will help, also affidavits from friends and neighbors that the child lived with you.  You should hold on to all such records as your proof since this can take a year or two if both of you claim the same child.
**Disclaimer: This post is for discussion purposes only and is NOT tax advice. The author takes no responsibility for the accuracy of any information in this post.**