With the tax law change, effective 2018, most students will get the same refund whether they claim themselves or not. The personal exemption has been eliminated and the standard deduction increased. This also applies to non students, under age 25.
On the other hand, if you live by yourself and have a full time job, it's unlikely a parent is allowed to claim you.
But to answer your question, here's what happens:
If someone else claimed you, as a dependent, inappropriately, and if they file first, your return will be rejected if e-filed. You would then need to file a return on paper, claiming yourself, if appropriate. The IRS will process your return and send you your refund, in the normal time. Shortly (up to a year) thereafter, you’ll receive a letter from the IRS, stating that your exemption was claimed on another return. It will tell you that if you made a mistake to file an amended return and if you didn't make a mistake to do nothing. The other party will get the same letter you did. If one of you doesn't file an amended return, unclaiming the exemption, the next letter, from the IRS, will require you to provide proof. Be sure to reply in a timely manner.
Winner gets the tax benefits; loser gets to pay the IRS back with penalties and interest.
Since you filed first, it is most likely your parent's return that got rejected. So they are faced with the choice to delete you or file on paper and let the IRS sort it out.
Full dependent rules: