The Academy is a Terran building that can be built after Barracks are constructed. The Academy, like the Armory, does not produce Terran units, but instead provides the technology for its complementary building, the Barracks, to do so. Additionally, the Academy allows the Terran player to build the Comsat Station add-on onto the Command Center, as well as research upgrades for Medics and Firebats.
In the TvZ match-up, the Academy is typically built fairly early on as it is a requirement for 1) Medics, which are a staple of the Terran Bio army in this match-up and 2) Comsat Scans to provide early scouting and to defend against burrowed Lurkers. Build orders commonly start the Academy at around the same time as the Refinery. Stim is usually upgraded before marine range, while the Medic upgrades are rarely used.
In TvP and TvT match-ups, players typically build their Academy later on, largley to unlock the Comsat Station option.
Upgrades being actively researched by the Academy can be visibly seen by its flashing animation.