First ask yourself what part of yourself allowed you to cheat on her in the first place. Now ask yourself why you would never do that again - honestly, because if you suspect you could cheat again, you may want to think about getting counseling to overcome that so you don't hurt her. Also, "I won't do it again because it's wrong" probably isn't a good answer for yourself because you must have thought it was wrong back then and you still did it, right?
Ready to not cheat again? Now tell her, because if your relationship is going to survive, you need that level of trust. Explain to her that you really love her, the reason(s) why you did it then, and the reasons why you won't do it again. If she forgives you, you're a damn lucky guy and you better be nice to her. If she dumps you because of this, don't be too aggressive trying to get her back. Either let her go, or if you really, really love her, send the occasional message every couple weeks or so. Give her time to think on her own.
P.S. Stress that it wasn't her fault, since she's had boyfriends who did that before. Poor girl. D: