Do you just generate random patterns and give them to users, which is somehow non repeating? Also, where can I find more about this. Thanks.
That is called a Gravatar, which by default is generated by hashing your e-mail address. To change it you go to your account page (by clicking on your own username), click on "edit", and there is a link available for you to change your picture.
Theoretically, as a hash, the Gravatar is not unique. But the probability of actual collision is really, really low.
Googling Gravatar Algorithm from Willie's answer gave me the hint. Here are some other quesstions: