Retirement tax questions

More information is needed.  Did you just do a full withdrawal without telling the plan what you were doing?  Or did you inform them that you needed to withdraw excess contributions?  When did you withdraw the money and close the IRA?  What code is in box 7 of your 1099-R?