You will need to file Form 5329 to pay the 6% penalty for each year the excess stayed in the account. You will need to download Form 5329 for each year at the IRS website. To get Form 1040-X please see the IRS website.
If you didn't make a full contribution in one of the following years then you can absorb the excess contribution in that year. If always contributed the maximum each year then you will need to take a regular distribution of $410 (without the earnings) to remove the excess contribution. You will get a 2023 Form 1099-R and this will be entered next year on your 2023 tax return and will remove the excess contribution.
"If you are filing Form 5329 for a prior year, you must use the prior year's version of the form. If you don’t have any other changes and haven’t previously filed a federal income tax return for the prior year, file the prior year's version of Form 5329 by itself (discussed earlier). If you have other changes, file Form 5329 for the prior year with Form 1040-X, Amended U.S. Individual Income Tax Return." (Instructions Form 5329)
On the 2012 Form 5329, you will enter the $410 excess contribution on lines 15 and 16 and calculate the 6% penalty on line 17. In the following years, you will enter the $410 on line 9 (from the previous year line 16) and see line 10 instructions. Enter line 16 and calculate the 6% penalty on line 17.