Entropy, concentration, and learning: a statistical mechanics primer