The Code History tab is a way for teachers and students to see all of the changes and revisions that have been made to a certain program, and allows you to revert a program to any previously saved version. It is accessible on any exercise page under the "More" tab in the top right corner.
Students will find the History tab useful as it allows them to walk through how they solved a certain problem, or they can use it to back up to a previously saved version of the program if they are stuck.
Teachers will find the History tab useful in understanding exactly how a student went through and solved (or got stuck on) a given problem. Also, the History tab is a great tool to aid in cheat detection, as teachers can assume that exercises (particularly more complex exercises) that are solved in very few code runs/saves are often attributable to borrowed or copied code.
There are several circumstances that cause a version of the students code to be saved in the History Tab. A version of code is saved every minute that a student is active in the code editor. Code is also saved when a student: Clicks Save, Checks Code, Submits Code, or Pastes Code into the code editor.