You will receive a form 1099-Q, for the distribution, from the 529 account. Box 1 will be the total distribution amount. Box 2 will be the taxable "earnings". That amount will have tax calculated on it. In addition, there will be a penalty of 10% of the box 2 amount (identified on form 5329 as "additional tax".