Rock salt is the mineral form of sodium chloride, otherwise known as table salt. It's sometimes referred to as “halite,” especially when it is used industrially. This form of salt is available in most grocery stores and also in hardware stores, which stock it in massive bags for the purpose of keeping down ice on the roads in the winter. There are a number of uses for rock salt, ranging from making homemade ice cream to deterring trespassers.
The primary difference between rock and table salt is the size. Rock salt forms in very large, chunky crystals, as opposed to the small crystals seen in table salt. Like table salt, it also has an assortment of trace minerals that can have an impact on how it behaves chemically. Because of the large crystal size, rock salt is not usually used directly in cooking, since it takes a long time to dissolve.
This form of salt is mined from deposits that form underground. These deposits are usually the remains of inland seas that evaporated thousands or millions of years ago. In contrast, table salt comes almost exclusively from evaporation ponds that remove salt from seawater. Humans have been aware of deposits of rock salt for centuries, and when salt was still quite rare, wars were sometimes waged over the control of such deposits, because salt is so critical to many human activities.
Salt lowers the freezing point of water, so rock salt has historically been used to salt icy roads in winter to melt the ice away. Road salt, as it is sometimes called, has been largely phased out in favor of other materials such as sand due to concerns about salty runoff and the environment. Rock salt is also used in a wide variety of manufacturing applications in which salt is required. People sometimes use it as a form of humane ammunition to drive off unwanted animal and human visitors without hurting them, although a face full of salt can be potentially very dangerous, especially if pellets it get into the eyes.
At home, people often use rock salt when they make ice cream. When it's packed in with ice in an ice cream maker, it lowers the freezing point, allowing the ice cream to get colder. The salt can also be used in pickling and curing, and to make salt crusts for various food items. If it's going to be consumed, cooks should be sure to purchase food-grade rock salt, as some companies treat salt intended for roads and other uses with chemicals.