With pk=n_k/n being the fraction of the n_k samples from class k = {0,1} out of the total of n samples at node τ, the Gini impurity i(τ) is calculated as 1-p_0^2-p_1^2. The more discriminativ or clean a node is the lower is the value. A split will happen, if the decrease (delta_i) of the value is great for a given node. The gini decrease is the sum over all nodes in all trees of their delta_i's.
H. Bostrom. Proceedings of the Sixth International Conference on Machine Learning and Applications, page 211--216. Washington, DC, USA, IEEE Computer Society, (2007)
R. Shapovalov, A. Velizhev, and O. Barinova. Proceedings of the ISPRS Commission III symposium - PCV 2010, volume 38 of International Archives of Photogrammetry, Remote Sensing and Spatial Information Sciences, page 103-108. Saint-Mandé, France, ISPRS, (September 2010)