They were cooked too long, you got the oven temperature wrong or you used a cheaper cupcake tin. Cheap tins are thinner and more likely to make cupcakes burn.