Each priority level is considered its own bracket. If both moves are in the same bracket, in other words, the same priority, each Pokemon's Speed stat is taken into account to determine move order. For example, a faster Pokemon's Quick Attack will go before a slower Pokemon's Quick Attack. However, if the priority of the two moves are different, the higher priority move will go first, i.e. a Quick Attack will always go before a Tackle, regardless of Speed.
Trick Room reverses the use order of the moves in the same priority. For instance, if a Pokemon with 3 Speed is up against a Pokemon with 10 Speed, the one with 10 Speed would normally go first, but under Trick Room, the one with 3 Speed goes first. Higher priority will still beat lower priority, however. Pokemon with Full Incense, Lagging Tail, and Stall completely ignore Trick Room, so they go last in the order explained above. Pokemon with Quick Claw completely ignore Trick Room as well, so Quick Claw still makes you go first, and if two Pokemon activate their Quick Claw, the faster Pokemon still goes first.
Quick Claw gives your Pokemon a 20% chance of ignoring Speed and going first within your speed bracket, barring the enemy also activating a Quick Claw, in which case normal Speed rules would apply. Speed and Quick Claw never let a move with a lower priority beat a higher priority (so a Quick Claw activated Deoxys-S using Counter always goes after Macho Brace paralyzed Shuckle using Bug Bite). Custap Berry makes your next move automatically go to the top of its priority bracket after activating.
Full Incense, Lagging Tail, and Stall make that Pokemon always move last, if both Pokemon are using a move of the same priority. Lower priority moves will still always go after higher priority moves, regardless of Full Incense, Lagging Tail, and Stall. If two Pokemon with Stall are out at the same time, the one with higher Speed goes last. If two Pokemon are holding Full Incense or Lagging Tail at the same time, the one with the higher Speed goes last. If a Pokemon with Full Incense / Lagging Tail is out against a Pokemon with Stall, the one with Full Incense / Lagging Tail goes last. If a Pokemon with Stall activates Quick Claw, then that Pokemon will still go first, barring a faster Pokemon activating its Quick Claw.
Pursuit comes right before a switch if a switch is used. It doubles in power if they switch out. If they use Baton Pass and you are faster, the Pokemon using Baton Pass takes normal damage. If they use Baton Pass and you are slower, the Pokemon they pass to takes normal damage. If they use U-turn and you would normally go before them, the Pokemon using U-turn takes normal damage. If they use U-turn and you would normally go after them, the Pokemon using U-turn takes double damage, and then they select the Pokemon to bring out, which takes no damage, so essentially, if you use Pursuit and they use U-turn and you would normally go after them, Pursuit has 0.5 priority (so in Trick Room, you would have to be faster than them to get the boost, unless their Quick Claw activates or you are holding Full Incense / Lagging Tail or have the ability Stall). Volt Switch works in the same way as U-turn.
Focus Punch's charge message comes at the very beginning, before even switching.