Discovering you overpaid taxes is a good thing- you'll be able to get some money back from the IRS instead of just sending them your cash. However, there are certain things you must be aware of if you hope to get money back after a tax overpayment.
Generally, you will have three years from the time when the taxes were filed/paid in order to get back extra money you are owed. In order to do so, the process involves filing an amended return. Essentially, this means you are going to file a new tax return for the time period in which you were owed the money in which you correct whatever mistake you made. If you under-reported your deductions for example, or if you overstated the income you thought you earned, you'd amend your return to correct this problem. The IRS will then review the amended return, determine what impact it has on your taxes (in this case, you'll be getting a larger refund) and process the return just as they would with any other tax return that has been submitted.
If you are hoping to file an amended return or otherwise to try to collect money that you believe you are owed by the IRS, you may wish to consult with an experienced tax attorney for help. Tax forms can be confusing and you want to make sure you fill the return out properly and comply with all requirements so that you can get back the money that you are owed by the IRS.