What do you mean, 'like in the restaurants'? I've had refrieds 10 ways in 10 restaurants!
Basically you take your beans, soak 'em, drain 'em, cover 'em with water and maybe a whole peeled onion and whole peeled garlic clove or two, bring to a boil and simmer til beans are soft. Drain the water, but save it, and remove the onion and garlic.
Mash the beans with a potato masher if you want a sort of rough texture, or process in blender or food processor for a smooth bean. Add water to the consistency you want. Also at this point I usually add salt/pepper, chipotle chile powder or ancho chile powder, a little cumin, and maybe some garlic and onion powder.
Then heat shortening or lard (lard's authentic!) in a heavy skillet to a depth of about 1/2 inch, over medium or medium low heat. Add the beans slowly, so you don't spatter. Use a flat spatula to stir the beans around; just heat til they're warm and adjust seasonings. Be careful not to let the heat get too high; burned beans are a ***** to clean off the skillet!
Muy delicisioso!!!