The text is a crude joke that plays on the word 'fire.' The fox's act of urinating ('pissed') on the ice is humorously likened to an attempt to melt the ice with fire, which is a source of heat. The humor arises from the absurdity of the comparison and the unexpected use of the word 'fire' in this context.
Fire , quoth the fox , when he pissed on the ice .