In 'Star Wars: A New Hope', the trash compactor monster is a dianoga.
The dianoga is a large, tentacled scavenger native to the galaxy's swamps and sewer systems. In the film, one has made its home in the Death Star's garbage-compactor network, where it attacks Luke Skywalker and his companions after they are trapped between the closing walls. Luke first notices the creature when a tentacle wraps around his leg and pulls him beneath the filthy water.
The group initially assumes the creature has killed Luke when he disappears. He resurfaces later, and the dianoga's eye briefly emerges from the water before the compactor walls crush the surrounding refuse. The monster is not the reason the compactor stops: R2-D2 remotely shuts down the machinery after Princess Leia reaches the correct control panel.
Viewers sometimes confuse the dianoga with the rancor, another famous Star Wars creature. The rancor appears in Jabba's palace in 'Return of the Jedi', while the dianoga is the slimy, one-eyed creature associated specifically with the Death Star trash compactor.