"Can I use masa harina to make polenta or grits? Are they all the same thing?"
Masa harina is corn flour made from dried corn treated with lime (not lime, as the green citrus fruit, but lime, a non-toxic inorganic compound called calcium hydroxide often used in food production). The lime affects both flavor and texture. One main use of masa harina is in corn tortillas.
Traditionally, grits were made in much the same way (although available in a variety of grinds). These days, however, most of what is sold as grits has not been treated with lime. That makes it more like polenta, which is never treated with lime. Polenta is often, but not always, a finer grind than grits.
Recipe below: Creamy Cheese Grits
Our friends at Bob's Red Mill sell one product for both polenta and grits. That product is made from degermed corn, while corn meal and corn flour are made from grinding the whole grain.
Recipe: Creamy Breakfast Polenta