In his last letter to Hardy, Ramanujan defined 17 peculiar functions which are now referred to as his mock theta functions. Although these mysterious functions have been investigated by many mathematicians over the years, many of their most basic properties remained unknown. This inspired Freeman Dyson to proclaim: The mock theta-functions give us tantalizing hints of a grand synthesis still to be discovered. Somehow it should be possible to build them into a coherent group theoretical structure. This remains a challenge for the future. --Freeman Dyson, 1987 After recalling the story of the enigmatic Ramanujan, we describe the solution to Dyson's "challenge for the future", and we describe recent consequences of this theory: Combinatorial Number Theory The Moore-Witten Conjecture on Donaldson invariants Moonshine for affine Lie superalgebras Birch and Swinnerton-Dyer Conjecture and Gross-Zagier Theory