She may still have feelings for you (but the two of you are quite young) and this is around the time when she is realizing that she may want to explore other options and not get too deep into the relationship.
It may be that she wants to take things slower or take a break for some time to think things over. You did well apologizing to her and letting her know that things will improve. She has to be able to trust you (and your actions will show her that) Let her know that everyone makes mistakes and that you are trying to work on yourself and the relationship. Figure out what she wants out of the relationship and take her feedback.