This is a fairly standard function that you can find dotted around the web (in this case I pulled it from here):
float rand(vec2 co){
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
}
It is useful for creating noise inside a shader (eg perlin noise). There are many other noise functions that can be created. In this video, the terrain was randomly generated inside the vertex shader using a ported version of blender's hetero_terrain generator (and some other modifications).