A mob's icon and level will indicate whether it will attack on sight or not.

If the icon is blue, then it's a passive mob, and won't attack unless it or a fellow mob that it's linked with (indicated by those lines dejiko_san mentioned) is attacked first. Whether you're in a party or not shouldn't affect this.

If the icon is red/orange, then it's an aggressive mob, and will attack any character who's under or up to 10 levels above its own level if they pass too close and within its range of vision. (Apparently mobs are all deaf, though, because so long as you pass behind them and not in front, you can go right next to them and they won't notice. Even mobs that don't appear to have eyes still have forward-facing visual range.)

If you're more than 10 levels higher than an aggressive mob, then it'll act as a passive mob (though still keep that red/orange aggressive icon).