I'm in my 3rd year as F-1 student, and I'm 10 months in my OPT. When I submitted my W-4 form to my employer, I didn't know that I should put 1 for allowances, I recently found out about it when I was researching about tax return. I will file a new W-4 with my employer, but is it going to cause a problem for the past year's tax filing? How can I fix this error?
the only problem could be that you underpaid your taxes and will owe when filing your return
No it shouldn't be a problem since you fixed the issue once you realized the error. However, you may owe taxes because the more allowances you have on your W-4 increases your pay but lowers your withholdings.
Please note - If you are an F-1 visa holder, you are considered a non-resident alien for the first 5 (students) calendar years because you will be exempt for the Substantial Presence Test (SPT) .
Please refer to this US Tax Guide for Aliens for additional information about visa exemptions and the various filing requirements.