Principles of Self-supervised Learning in the Foundation Model Era