Beginning and Ending Combat
The GM determines when combat begins, often by telling players to roll initiative checks. As long as there are enemies to fight or threats for which it is important to determine who acts in what order, the characters are considered to be in combat. When the GM has decided there are no imminent, known threats left, the combat ends and initiative no longer dictates when characters can act. When the only creatures remaining on one side are so insignificant that they pose no real threat to characters from the opposing side, such as foes with a CR 4 or more below the average level of the PCs, the GM can decide whether the characters are still in combat. See Significant Enemies on page 242 for more on how to gauge this.
Source
Core Rulebook pg. 238