Preheat your oven to 350°F (175°C) and line a muffin tin with cupcake liners.
In a medium bowl, whisk together the flour, baking powder, baking soda, and salt.
In a large bowl, beat the sugar and butter together until light and fluffy. Add the eggs one at a time, beating well after each addition. Stir in the vanilla extract.
Gradually add the dry ingredients to the wet ingredients, alternating with the milk, beginning and ending with the dry ingredients. Fold in the chopped apples.
Divide the batter evenly among the cupcake liners, filling each about two-thirds full. Bake for 20-25 minutes, or until a toothpick inserted into the center comes out clean. Let cool completely before frosting.
To make the caramel frosting, melt the butter in a saucepan over medium heat. Add the brown sugar and heavy cream, and bring to a boil. Let boil for 1 minute, then remove from heat and stir in the vanilla extract. Let cool slightly.
Gradually beat in the powdered sugar until smooth and creamy. Frost the cooled cupcakes with the caramel frosting.