For UCI protocol the openbooks and TB are handled by the GUI - with an option to not use them. Same with the winboard protocol engine - but the engines handle the opening book and TB with the option to not use them if configured. Nothing is pre-programmed.
Opening book is the combination of best moves in the opening stages of the game taken from 1000s of games played by human players. Chess engine uses them to "minimize" the error in opening position. They can beat even the best grandmaster without opening book.
End-game Tablebases are every possible combination of moves at the end of the game. Currently only 3-4-5-6 pieces TBs are available (a combination of ~1.6 Terabyte of data).
Again, nothing is pre-programmed. Using them gives them an advantage of ~30-40 ELo points, which means little when you are already 300-500 elo points stronger than the strongest human opponent (fair guestimation IMO)
EDIT: Just realized you wrote "reprogrammed" not "preprogrammed", not sure what do you mean by "between rounds" and "Cheating". Most strong chess programs are binary builds and most of them use popular protocols like UCI and Winboard to handle GUI functions and everything is automated so I am kinda confused by the "reprogrammed" part.