Take off your hat indoors.

Literal

Room [at-では] hat [object-を] take-off [imperative-なさい].

帽子を取る means 'to take off one's hat' — 取る rather than 脱ぐ is used for hats specifically (脱ぐ is for shoes, clothes). ~なさい is the polite imperative, softer than a plain command.