When a combat starts, if a character was not aware of his or her enemies and they were aware of the character, that character is surprised. Likewise, a character can surprise his or her enemies if the character knows about them before they’re aware of the character.
The Surprise Round
If some but not all of the combatants are aware of their opponents, a surprise round happens before regular rounds begin. The combatants who are aware of the opponents can act in the surprise round, so they roll for initiative. In initiative order (highest to lowest), combatants who started the battle aware of their opponents each take an attack action or move action during the surprise round (see Action Types). If no one or everyone is surprised, a surprise round does not occur.
Combatants who are unaware at the start of battle do not get to act in the surprise round. Unaware combatants are still flat-footed because they have not acted yet. Because of this, they lose any Dexterity bonus to Defense.