For homemade refried beans (skip if using canned refried beans), in a medium skillet over medium heat, warm the oil. Add onion and cook until soft and translucent, stirring occasionally, about 15 minutes.
In a blender, scoop out the beans from the can and leave most of the liquid inside the can. Add ¾ of liquid into the blender. Add the cooked onion, but not the oil. Blend until almost smooth. Transfer the beans back to the same skillet with the oil in it. Cook until it starts to bubble over medium heat. Then, reduce heat to medium-low and cook until the beans are darkened and thickened (like a paste), about 30 minutes. Transfer to an airtight container and keep in the fridge if not using right away.
For the tostada, preheat the oven to 200˚F (95˚C). Line a baking sheet with aluminum foil. Set aside.
In a small bowl, crumble the cheese with your fingers into small pieces.
In a small bowl, add refried black beans and warm in the microwave if it’s not hot.
Cut the avocados in half and remove the pits. Remove the flesh carefully with a large spoon in one piece. Put onto a cutting board and cut into slices. Repeat with the rest.
Put the tostadas on the baking sheet and bake for 3 minutes.
To assemble, scoop and spread a layer of refried beans on each tostada. Sprinkle with some cotija cheese. Gently lay avocado slices on top. Sprinkle with more cotija cheese. Serve immediately.