There are actually three ways to stun enemies:
- hold X until your staff has charged and release to do a stun attack
- shooting an enemy with stun ammo
- having Trip use an EMP to stun enemies when they attack her
I can vouch for this third option because the achievement unlocked for me when Trip used an EMP to disable a couple of mechs. Not that there are that many moments when it's possible for mechs to gang up on her but still good to know.
Stunning is a great way of gaining some moments to breathe when you're being attacked so I would recommend to stun your enemies before properly attacking anyway.
Don't worry if you don't have the achievement yet when you get the achievement for killing 200 enemies. Remember, you're also killing them by hijacking turrets; you're neither stunning the turrets nor the mechs you gun down with them. Plus, there's types of enemy that can't be stunned; they'll count towards your kill count but not your stun count.