Peel half of a large, sweet onion. Cut it into slices about ⅓-inch wide. Set the onions aside.
Rinse the mushrooms under a light stream of cold water and use a vegetable brush or paper towel to remove the dirt. Pat each mushroom dry with paper towels. At this point, you can start to cook the onions before finishing the mushroom prep.
Melt the butter in a 12-inch skillet over medium-high heat. Add the onions, stir briefly and spread them out evenly in the pan. While the onions are cooking, finish prepping the mushrooms. Cut off the hard edge of each mushroom stem and slice the mushrooms about ½-inch thick.
When the onions are starting to brown slightly, stir the mushrooms into the pan and spread them out so they cook faster. Increase the heat to high and cook the mushrooms, uncovered, without any seasoning.
Occasionally stir the mushrooms until all of the liquid they release has evaporated and the mushrooms are golden brown. It could take 7-10 minutes, depending on your pan. (In the meantime, you can press the clove of garlic or finely chop it and set it aside.)
When the liquid has evaporated, stir in the pressed garlic, salt and pepper. Stir the mushrooms around for 30 seconds, then turn off the heat. (You want the garlic to be cooked but not burned.)
Serve within two hours of making them and refrigerate leftovers in a sealed container for up to four days.
Notes
Buy the cleanest, whitest, button mushrooms you can find. Whole mushrooms are easier to clean than sliced ones. Sometimes the packages of sliced mushrooms still have dirt.
Wait until the mushrooms are cooked before adding salt. Otherwise, they'll release more liquid, become soggy and take longer to cook.