Polenta and grits are both ground corn. Grits though, are usually white ground hominy dent corn, and polenta is made (usually) from yellow flint corn. Grits are (usually) a coarser grind than polenta.
For all practical purposes, you can interchange the two, but a purist would shoot ya.