In a large nonstick skilled over medium heat, warm the olive oil. Add 1 cup of the beans, and using a potato masher, crush them to a rough purée. Cook them, stirring them often with a wooden spoon, until thick, about 5 minutes. Repeat this with the rest of the frijoles, always adding them 1 cup at a time, mashing them, and then simmering them until thick before adding the next cup. The beans are done when the puree is thick and creamy—unless you like drier refritos, in which case you should fry them another 5 minutes or so, stirring constantly. The beans can be cooked in advance and refrigerated for up to 2 days. Thin them with a bit of water and reheat them in a microwave oven or in a heavy pan over low heat, stirring often.