"我学英语" = "I learn English" -- it is the main clause
"学了4年了" = "have learned (it) for four years" -- it is the relative clause that give us additional information of 'the duration of the action' .
"我学英语学了4年了" = "I learn English, and I have learned it for four years"
Repeat the verb in the relative clause that state the duration of the action is a common structure in Chinese. It put emphasis on the duration.
Example:
我吃了飯 (I've eaten dinner)
我吃了一小時飯 (I have eaten dinner for one hour)
我吃飯吃了一小時 (I ate dinner, have eaten for one hour) -- Repeat the verb in the emphasis on the duration
Both "我吃了一小時飯" and "我吃飯吃了一小時" mean "I ate dinner for one hour" the difference is the former is a plain SVO sentence that doesn't emphasize anything and the latter emphasize the duration (一小時) which becomes more important in the sentence
Similarly
我吃了飯 (I've eaten dinner)
我吃了十碗飯 (I've eaten ten bowls of rice)
我吃飯吃了十碗 ( I ate rice and I ate ten bowls of it) -- emphasize the quantity