It most likely overheated. Gradually heat the chocolate and stir often. Once the chocolate has melted and is smooth, you are done melting it.