I just purchased a 2004 Rav4 L today!

I am not very car savvy, but noticed that the rims were corroding. The dealership was kind enough to repair them next week (really I think the salesman needed a sale!). Does anyone know HOW to repair corroded rims? Does it work well or am I asking for more problems down the road?
I asked for them to be replaced, but the dealer said they could be repaired- he just could not explain how. I'm just curious about the process and would appreciate any input.
Thanks!!!