A rat was a type of rodent that was larger than a mouse. They were typically found on Earth as well as a variety of worlds. In laboratories, Humans would test rats response to stimuli by placing them in mazes and giving them a treat if they succeeded in getting out of the trap. The treat was often a piece of cheese.
In early 2365, while the USS Enterprise-D was entrapped in a void, Chief Engineer Geordi La Forge stated out loud, "Like the rat said: Keep the cheese. I just want out of the trap." Later, Doctor Katherine Pulaski would likened the situation of the Enterprise-D to that of a rat in a maze. (TNG: "Where Silence Has Lease")
A year later, Odo sneaked aboard a Kressari freighter and disguised himself as a rat again to investigate allegations by one of Quark's contacts that the Kressari were arming the Bajoran extremist group known as "The Circle". (DS9: "The Circle")