1. The Aliens killed the hundreds of colonists on the planet already, no mean feat I'm sure, what with their initially inferior numbers. That shows intelligence and cunning.
2. When the Marines landed, this was a clearly well armed, well trained group of men. Sensing this, the Aliens were smart enough to stay out of sight and lure them into their hive and kill the majority of them with minimal casualties to themselves.
3. They then managed to destroy the survivors incoming ship and (at the time) only escape route.
4. The survivors then barricaded themselves in. The Aliens had likely never come up against assault guns before and didn't know of another way in, which explains why they charge the guns. When this was proving too costly they retreated and managed to find another way in that even the humans had missed.