802.11g is a 2.4 GHz only technology allowing speeds up to 54 Mbps.
802.11n is a common 2.4/5.8 GHz technology allowing speeds up to 600 Mbps.
802.11ac is a 5.8 GHz only technology allowing speeds over 500 Mbps and up to gigabit speeds.
Now for some historic perspective:
Advancement in WiFi technology can be broadly divided in two phases: before and up to 801.11g, and later development from 802.11n and beyond.
802.11g was the last in a long evolution of standards, beginning with 802.11a (5 GHz technology) and 802.11b (2.4 GHz technology). 802.11g was a important step for unification, as it used a similar set of technologies and modulations already used in the 5.8 GHz band to allow speeds up to 54 Mbps in the 2.4 GHz band.
The introduction of 802.11n marked the beginning of a new phase.
It leveraged a set of much more complex and powerful algorithms to reach speeds in the range of hundreds of Mbps.common speeds for residential applications range from 150 Mbps to 600 Mbps, although practical speeds were usually in the lower range.
802.11n took some time to mature, partly because of the complexity of the underlying silicon and firmware necessary, but also because it had to work on both frequency bands.
The 2.4 GHz band is very narrow, with overlapping channels which limit the applicability or extensions of the techniques introduced by 802.11n.
For this reasons, 802.11ac was developed as a 5.8 GHz only standard, pushing the same technologies of 802.11n to the limit.
Read more about What is the difference between G N and AC wireless routers: