For baked beans, first soak the beans overnight in plenty of water.
The next day, peel and coarsely chop the onion and garlic.
Put the beans in a large enough pot with the water. Add the onion and garlic. Bring to a boil and simmer until the beans are tender. Drain off the liquid and mash the beans. The mixture should now be quite thick.
Heat plenty of lard in a skillet and sauté the mashed beans in it. Serve the frijoles refritos as a side dish.
Preparation Tip:
Frijoles refritos are usually served with crumbled feta cheese with many Mexican dishes.