Parties of up to four share one dungeon with no friendly fire and three loot-split rules. Only public matchmade runs let other players fight you.
A party holds up to four players. Create a party at camp, hand out the four-character code, and everyone drops into the same dungeon — same monsters, same chests, same loot, same closing darkness.
There are three loot rules: roll (the default — everyone who wants it rolls, highest takes it), bid (spend gold, highest bid wins, the gold is sunk), and free-for-all (first hand on it). Whoever reaches the blue gate first extracts first; teammates who already left or died do not hold up the rest. Taking the red gate keeps the party together one floor down.
Public matchmaking can put you in a dungeon with players you did not invite — solo runs pool with strangers, party runs pool with rival parties (the two pools never mix, and teammates can never hurt each other) — and hostile players can damage each other. Dying to another player scatters your carried gear on the ground for anyone to take, which makes the last stretch to the exit — bag full, health uncertain — the most dangerous part of a run. Daily Trials, the Endless Abyss and custom challenge modes are pure PvE with no strangers at all. Playing solo online in a normal run, you can also pay an extra gold fee for lone-wolf mode (1000 gold by default) to guarantee the map is yours and nobody gets matched in.
Full rules are in co-op & PvP, and the extraction and death rules are in the beginner guide.