Ankylosaurus was like a tank, with lots of thick, bony armor on its body. It also had a nasty weapon, a heavy club on the end of its tail, which it could swing around and smash into an attacking dinosaur. There probably weren't many creatures, even a big T. rex, who would want to mess with this guy.
As a defensive creature, Ankylosaurus was one of nature's most perfect designs. It was almost impervious to being bitten from above and its long, strong tail muscles would have been able to swing its club with great force.
There is very little fossil material from this dinosaur - it was apparently the last and largest of this family of armored dinosaurs. It walked fairly upright on all four legs, carrying its tail off the ground and it is theorized that it would drop to the ground when attacked to use its armor as a shield to cover its legs and under belly.