A bug is an inconsistence in the functionality of a computer system. They are commonly caused by error during the programming phase, which must be corrected by the developer, or failures in the APIs and libraries the developer depends on.
The bug word comes from the ancient computer times, when giant room-sized computers produced a lot of heat and physical bugs felt attracted to it. When a bug damaged the computer a maintennance functionary had to physically go and remove it for the computer to work properly.
Roguelikes are very susceptible to bugs because of their complex nature and the single person development model most of them sport.