Heat a medium sized frying pan over medium high heat. Add oil and onion, saute until starting to turn golden. Add garlic and then beans and stir for a few minutes until coated with oil. Mash beans with a fork or potato masher directly in the pan, until desired consistency. Then stir and add a little water, maybe 1/4 cup to keep it the mixture moist.
Remove from heat, sprinkle with cilantro and salt to taste.