First of all, you should wash the corroded battery terminal with water and then burnish it seriously with a sand paper until that you can observe the copper or iron;
If you find it is iron, you’d better smear some machine oil over the battery terminal. What if you don’t have machine oil? Edible oil is another awesome alternative actually.
In a nutshell, the purpose of smearing machine oil is that preventing the battery terminal from getting rusty again.