After an encounter, add up the raw XP of every monster defeated, then divide by the number of characters who took part. A 1,200-XP fight shared by four characters gives each 300 XP. That’s the whole rule — XP is tracked per character, not as a shared pool.
Important: the encounter multiplier (×1.5 for two monsters, up to ×4) is only for judging a fight’s difficulty — you do not apply it when awarding XP. Awards always use the unmodified monster XP totals, so a swarm of weak monsters is dangerous but doesn’t hand out bonus experience.
Who counts as "the party" is up to the DM — usually everyone present, including anyone who contributed even without landing the final blow. Absent players are commonly left out of the split, which is one reason many tables switch to milestone leveling.