Human milk is the gold standard for infant feeding. Human milk oligosaccharides (HMOs) are a unique group of oligosaccharides in human milk. Great interest in HMOs has grown in recent years due to their positive effects on various aspects of infant health. HMOs provide various physiologic functions, including establishing a balanced infant's gut microbiota, strengthening the gastrointestinal barrier, preventing infections, and potential support to the immune system. However, the clinical application of HMOs is challenging due to their specificity to human milk and the difficulties and high costs associated with their isolation and synthesis. Here, the differences in oligosaccharides in human and other mammalian milk are compared, and the synthetic strategies to access HMOs are summarized. Additionally, the potential use and molecular mechanisms of HMOs as a new food bioactive component in different diseases, such as infection, necrotizing enterocolitis, diabetes, and allergy, are critically reviewed. Finally, the current challenges and prospects of HMOs in basic research and application are discussed.