When a German says to you “Ich verstehe nur Bahnhof”, they don’t literally mean “I only understand train station”. Rather, they’re telling that they’re confused.
This idiom is similar in meaning to the English “it’s all Greek to me", and indicates that you don’t understand something, or don’t want to understand something.
Like many idioms, its origins aren’t totally clear, but it seems to have originated around the 1920s.
The main theory is that it came about after the end of the First World War. Weary and tired soldiers wanted nothing else but to go home, and the way home was associated with the train station.
When you tried talking to them, the only word they would recognize was Bahnhof, because they so desperately wanted to get home.
Diese Anweisungen sind ja so unklar. Ich verstehe nur Bahnhof.
These instructions are so unclear aren’t they. It’s all Greek to me.
Kannst du den Mann aus Bayern verstehen. Ich verstehe nur Bahnhof.
Can you understand the man from Bavaria? I don’t understand at all