This is usually due to the mixture being too warm or adding the butter before the meringue has fully cooled down. Thankfully, it is easy to fix. Refrigerate the bowl for 15-20 minutes then continue mixing until the frosting thickens.