"zu trinken", infinitive of the verb "trinken", so "to drink". Ok, straight-forward English analogue.
"zum Trinken"? Abbreviation of "zu dem Trinken.", yes?
Literally "to the drinking" (not to the drinks, drinks is Getränken). "Drinking" is a gerund, a verb made into a noun (the "the" in front indicates it must be a noun). Yes?
So, "einen Kaffee zum Trinken" is a coffee to "fill the drink slot". The closest English analogue I can think of is, "as to the drink, I will have a coffee". Yes?
And I imagine in conversation, "zu trinken" and "zum Trinken" sound very similar?