Some may suggest that the best way to keep hash browns from sticking to a frying pan is to use a non-stick pan. The sticking problem isn't as simple as that, however. First off, pans coated with a non-stick surface don't brown foods as well as a properly seasoned cast iron skillet. For hash browns, you definitely want the golden, evenly-cooked crispness that a cast iron skillet can provide. Secondly, the coating on non-stick pans wears off over time. You don't want that chemical-laden coating to end up in your food, even in trace amounts. Food buildup and scarring on any pan, including the non-stick variety, can cause sticking.
Wash and tamp the excess moisture out of your grated potatoes. This helps to keep your hash browns from turning to mush and sticking to the pan while cooking. The simplest way to remove excess moisture is to spread the grated potatoes in a thin layer between sheets of paper towels and tamp down on them, allowing them set for a few minutes so the towels soak up extra moisture.
Sprinkle some droplets of water on the skillet to make sure it isn't too hot. A properly preheated pan is one of the keys to keeping the hash browns from sticking to the pan. If the water immediately vaporizes into steam, the pan is too hot. If the water sizzles, steams and balls up in the pan, you're at the right temperature. If the water pools up but doesn't sizzle at all, the pan needs more preheating.
Preheat the butter in a well-seasoned cast iron skillet. A well-seasoned skillet is one that has been used frequently and properly cleaned and oiled for storage between use. Medium heat works best for hash browns. Bacon grease can also be used along with butter to provide extra flavor, or vegetable oil can be used.
Place your grated potatoes in preheated butter in the skillet. Use vegetable oil, if butter and bacon grease don't suit your dietary needs. Portions no thicker than a 1/2 inch can be easily flipped with a spatula.
Cook until golden brown on one side before attempting to turn to the other side. At medium heat, it shouldn't take longer than eight to 10 minutes per side, but you'll need to keep a close eye on the hash browns, since it could take less time before turning. Cooking one side before attempting to turn the hash browns helps keep the potatoes from sticking to the pan.