Computer Games are not always perfect, sometimes the 'makers' of these games make mistakes and are saved into the game.
A glitch is something wrong in the game. For example:
In Harvest Moon: Friends
Geez I love to catch these stuff like like
*infinite juggle combo in Tekken3, Tagging in without running back in Tekken tag, and bouncing death by Julia Chang and more
*you can jump up again when you shoot in hole in Rockman3,
*100 lives in Mario1, teleport in vine area, and jumpback when you shoot in hole after long dash,
*and a bunch of glitch in CastlevaniaSotn