What are the differences between these clauses?

I learned English for 2 years.
I learned English in 2 years.
I have learned English for 2 years.
I have learned English in 2 years.