Re: How to tell what type of metal rims are?
Magnesium and aluminum are both alloys, and get the same type of polish.
Mg will almost always be a dull gray in color because it oxidizes so fast. They're also very light (and very expensive). Bare aluminum or magnesium will turn black when you rub a metal polish on it. If it doesn't turn black right away, that means there's a coating - usually a clear, sometimes anodizing.
A clear is sometimes noticed because of a rainbow hue on the rim when seen in direct sunlight. Use a paint product, or a plastic polish on the clear.
Anodizing is a hard thin coating, and can't really be polished. Once scratched, like chrome, the only proper fix is a replate.