Whilst Zach's answer is mostly factual regarding train stations with airport codes, this does NOT appear to be the situation here (eg, Frankfurt HBH does not have such a code).
Instead it appears that, despite the name, Google Flights now supports things other than flights - such as train tickets.
For example, if you search for trips from Frankfurt Hauptbahnhof to Munich Hauptbahnhof then it will return a number of options via train, and no options via plane :
It you instead search for trips from "Frankfurt" to "Munich" it will include options with both flights (from Frankfurt Airport to Munich Airport) and train (from Frankfurt HBH to Munich HBH) :
In all cases selecting the flights or train trips will take you to the relevant website to book, be that an airline like Lufthansa, or a train company like Deutsche Bahn.