In a medium saucepan, combine the pinto beans, water, diced onion, minced garlic, chili powder, cumin, dried oregano, salt, pepper, and cayenne pepper over low heat. Stir to mix the ingredients evenly.
Allow the mixture to simmer over low heat for about 5 minutes. This helps the flavors meld together and softens the onion.
Using a potato masher or the back of a spoon, mash the beans until they reach your preferred consistency. Remember, they won't be super smooth like canned beans.
Let the beans cook for an additional 10 minutes, stirring occasionally to prevent sticking. The beans will thicken as they cook and cool.
Check the consistency of your refried beans. Cook a bit longer if you want them thicker. Adjust seasoning if needed.