Preheat your oven to 350°F (175°C) and line a muffin tin with cupcake liners.
In a bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, and nutmeg.
In another bowl, beat the butter and sugar until light and fluffy. Add the eggs one at a time, then stir in the vanilla.
Gradually add the dry ingredients to the wet mixture, alternating with the milk. Fold in the grated apple.
Divide the batter evenly among the cupcake liners. Bake for 20-25 minutes or until a toothpick inserted into the center comes out clean. Let cool completely on a wire rack.
For the frosting, melt the butter in a saucepan over medium heat. Stir in the brown sugar and milk. Bring to a boil, then remove from heat and let cool slightly.
Gradually beat in the powdered sugar until smooth and creamy. Frost the cooled cupcakes.