In a large skillet heat the olive oil over medium high heat. Saute the onion and garlic in the hot oil until fragrant and translucent about 3-5 minutes.
Pour in the cans of pinto beans with all the liquids from the cans. Bring to a simmer and add the cumin, salt and pepper. Stir to combine.
With a potato masher, mash the beans until thick. Some beans can be left whole if desired. If you want creamy refried beans, these can be blended with a hand blender or standing blender.