With the rapid development of optical communication systems, more advanced techniques conventionally used in long-haul transmissions have gradually entered systems covering shorter distances below 100 km, where higher-speed connections are required in various applications, such as the optical access networks, inter- and intra-data center interconnects, mobile fronthaul, and in-building and indoor communications. One of the techniques that has attracted intensive interests in short-reach optical communications is machine learning (ML). Due to its robust problem-solving, decision-making, and pattern recognition capabilities, ML techniques have become an essential solution for many challenging aspects. In particular, taking advantage of their high accuracy, adaptability, and implementation efficiency, ML has been widely studied in short-reach optical communications for optical performance monitoring (OPM), modulation format identification (MFI), signal processing and in-building/indoor optical wireless communications. Compared with long-reach communications, the ML techniques used in short-reach communications have more stringent complexity and cost requirements, and also need to be more sensitive. In this paper, a comprehensive review of various ML methods and their applications in short-reach optical communications are presented and discussed, focusing on existing and potential advantages, limitations and prospective trends.