There are a few reasons this can happen. The most common reason is opening the oven door while the cupcakes are baking, causing them to deflate from the sudden decrease in temperature. Another reason is that you may have added too much batter to the cupcake tins or that your leaveners are no longer active (As in the baking soda and baking powder have expired). Lastly, another culprit could be that the ingredients of the batter have been overmixed - there may be too much air in the cupcake batter. Be sure to only beat the batter as instructed and measure your ingredients properly!