Photodetectors based on two-dimensional (2D) materials and their heterostructures have been attracting immense research interests due to their excellent device performances, such as ultrahigh photoresponsivity, ultrafast and broadband photodetection, polarized sensitivity, flexibility, and Complementary Metal-Oxide-Semiconductor (CMOS) compatibility. Here, we firstly compare the device performance of several photodetectors based on Schottky junctions and p-n junctions, such as photoresponsivity and response time. Then, we provide an overview of the recent progress on 2D material-based photodetectors, emerging strategies to improve device performances by structure optimization and bandgap engineering as well. Finally, we discuss the challenges and perspectives on the exploration of 2D materials and their heterostructures for future application in electronics and optoelectronics.