This is an easy, tasty refried beans recipe. It is a classic and can be served with so many main courses - from quesadillas and tacos to chicken mole or cheesy beef burrito.
In a large skillet, heat the oil over medium heat. Add the onion and garlic and cook, stirring, until the onion is soft - about 10 minutes.
Add the beans to the onion mixture. Cook for a few minutes, then partially mash the beans with a potato masher, stirring constantly. Add a bit of liquid from the cans of beans and continue cooking, stirring and mashing the beans with a potato masher occasionally, until this mixture is thick and the beans are about half mashed. Season to taste with the salt and pepper.