Bots are macros which basically work by you recording a series of mouse clicks which are then repeated when the program is closed. The goat's random attack is to stop them by attacking at any random time.
macro's. But if you want specifics. Bots are far more complex than macro's generally are. A macro is a program designed to record certain mouse clicks and key strokes, a Bot on the other hand can be programmed to do whatever you'd like it to do. Pretty much Artificial Intellegence if your coding skills are above average.
"Consilio Non Petu" - *By Wisdom, Not Force*