In 1946, when Hopper was released from active duty, she joined the Harvard Faculty at the Computation Laboratory where she continued her work on the Mark II and Mark III. Operators traced an error in the Mark II to a moth trapped in a relay, coining the term bug. This bug was carefully removed and taped to the log book September 9th 1945. Stemming from the first bug, today we call errors or glitches in a program a bug.
See more at http://en.wikipedia.org/wiki/Software_bug