How Unsupervised Learning Works