This is an implementation of Cellular automaton, more specifically Elementary cellular automaton which despite consisting of very simple rules is capable of very complex behavior (it can even simulate any computer *Turing complete).

The simple rules are that the color (or on/off state) of a cell is determined by the color of three cells just above. The rule in this site represent Wolfram code which is a number between 0 and 255. Which intern specifies which configurations of above three cells will result in which color. the binary number(01111110) represent the color of a cell corresponding to all the possible combination of above three cells.

And here is rule 126 for visualization.

rule30

Change rule by inputting a number in the input area and clicking set or clicking random to set a random rule. You can also change the rule by directly clicking the respective rule representation.

Rather than trying to explain the intricacies of the topic and failing misrably at it I encourage you to go to these resources for further understanding of the topic.