Heat the olive oil in a medium saucepan over medium heat. Add the onion and jalapeno and cook 3 to 4 minutes, until the onion is soft and translucent. Add the garlic and cook 30 seconds more, until fragrant.
Stir in the cumin and chili powder and cook 30 seconds, until warm and toasty. Pour in the black beans with their liquid and add the black pepper. Bring to a gentle simmer and cook 10 minutes, stirring now and then.
For refried black beans: take the pot off the heat and mash about half the beans with a potato masher, leaving the rest whole. Stir well. For extra-smooth beans, mash them all and stir in a splash of water. For whole seasoned beans, skip this step.
Take the pot off the heat. Stir in the lime juice and cilantro. Taste and add salt a little at a time until seasoned all the way through.
Serve warm, topped with crumbled queso fresco or cotija if you like.