Imagine the scenario: a group of adventurers are wandering down a narrow gorge deep in the wilderness when suddenly the eagle eyed Elven scout shouts a warning hat there are goblins in the rocks on either side. For a while it's a mass of confusion, swords whirl, spells fly, arrows wizz through the air and very soon the battles is won. Goblin bodies are dumped in the rocks and the adventurers go on their way a few coins the richer. Later the adventurers learn that a merchant band hostile to the parties employers will be passing through the same gorge carrying an item vital to their success in this mission. Eventually traps are set, spells are readied, Elven cloaks and rings of invisibility are placed at the ready and the ambush is set.
How often are monsters in a campaign portrayed as a bunch of disorganised rabble that seem to bumble unprepared into the adventurers path, yet the party, quite logically, plan every detail of their actions to the utmost. Monsters should be played as more than mere cannon fodder there to provide the players with treasure and experience points. Why did the monsters plan their attack so efficiently? How have they stayed alive this long? If they are really that bad at survival in their natural environment why has the race not died out long ago?
This can be overcome with a bit of forethought and the following of a few logical and basic rules.
Step2
In all but a few cases a monster will value his life as high as any player character does, they will therefore take all steps necessary to preserve that life. Exceptions are creatures that we can term "programmed" that is undead, those under spells or possession or religiously indoctrinated. Apart from that why would a monster be any less careful with his life than the player characters?
Step3
No monster should attack without knowing the reason for doing so. That is known to the DM, not necessarily the players, though the players should be able to work out, or find out the reasons if they so choose. It may be as simple as racial hatred, hunger, territorial boundaries, fear or the fact that it is under orders to guard or defend an area. If none of these conditions exist a more neutral stand point should be undertaken by the monsters in question. This leads to the following rule.
Step4
If a monster can achieve its aims without an all out attack, it will do so. Maybe it will negotiate, warn, trade, hide, follow, avoid and report back to its leader or even form an alliance with the party. There are a host of other objectives that the monster may be trying to achieve beyond merely resorting to violence. Maybe they are an adventuring band too.
Tips & Warnings
Even unintelligent monsters will have options. Even the dumbest creature will not blindly attack something unless it is fairly sure that it will be successful. Predators tend to stalk ad pick off the weakest target, lionesses split into groups and operate in pincer movements. If monsters didn't operate in similar ways, surely their species would die out due depletion and hunger. Also not all creatures kill straight away, giant wasps will carry a victim off to be the food for its young, burrowing creatures will pull the target under and hurry away rather than attack the whole group, leaving a tunnel that players can follow down at their peril.
Just as a character in a campaign is more that a few numbers on a piece of paper and the world is something that the players can interact with rather than a few maps, so monsters should have depth and believability beyond their basic descriptions. Monsters may not be people, but they do have feelings too.