This can happen when the toffee has not been stirred properly. While it's cooking, the toffee needs constant attention and stirring to hold the ingredients together.