Restaurants have an established tradition of serving baked oysters on a bed of snowy-white rock salt, a presentation that gives the dish an impressive appearance. They're also cooked that way, nestled firmly into a bed of salt for a few minutes' cooking at high temperature. There are several reasons why rock salt is the usual choice for this task, but you can use substitutes if it's necessary.
A Rock and a White Place
Rock salt is inexpensive when it's purchased in commercial quantities, which certainly is one reason why chefs -- usually a frugal group, given the tight profit margins in their industry -- favor it. However, cost is only a minor consideration. Visually the mounds of rock salt use for baked oysters resemble the crushed ice used for raw oysters, a pleasing correlation. The rock salt also serves to hold the oysters level as they bake, so the flavorful brine that fills their shells isn't lost. Finally, and most importantly, the salt helps ensure that the oysters bake evenly.
Consistency is King
One of the fundamental truths of the kitchen is that ovens heat unevenly. For a vivid illustration of this, sprinkle a thin layer of breadcrumbs over your largest baking sheet and place it in the oven. When they begin to smell toasty, look inside. You'll see some patches that are almost white, and others that are on the verge of scorching. With oysters, that would mean that some are fully cooked or even overcooked before the others are done. The rock salt minimizes that risk.
It's a Dry Heat
The standard technique is to spread the bed of rock salt in your pan, and then heat it in a very hot oven or under your broiler. The salt absorbs your oven's heat and retains it, like any other form of rock. When you nestle the deep side of your oyster into the salt, the evenly dispersed heat trapped in the salt begins to cook the oysters immediately. It also traps and absorbs any spills of liquid. After just a few minutes in the oven, the oysters are ready to serve, ideally on a mound of room temperature salt. That way the retained heat in the oven salt doesn't overcook them on the way to the table.
If you don't happen to have a big bag of rock salt on hand, coarse kosher salt is the best household alternative. Your local supermarket carries as much as you could ever need, so it's readily available. A few pantry staples such as rice, barley or dried beans can also work, holding the oysters upright but providing less heat to help cook the succulent shellfish. If you're a serious baker, you might have a few sets of the ceramic weights used to keep empty pie shells from puffing. These are ideal, trapping heat just as well as rock salt, but relatively few non-commercial kitchens have enough of them to cook a large batch of oysters.