Exactly how work gets divided depends on the team. Different people have different styles.
Usually the team leads and project managers break down large concepts into individual tasks. Those tasks are distributed to people by lists, or during meetings, or with organizational software, or by email, or by slips of paper, or by talking face-to-face, or by various other means.
Usually multiple methods are used. The task might be assigned in software, AND there are meetings discussing it, AND there are individual discussions. Another team might use a physical task board, AND slips of paper, AND in-person meetings.
As for code, there is generally one large code repository that works like a library. Files are checked out, edited by individuals, then checked back in.
Tools have more complex options to limit the damage caused by mistakes. Often each person works with their own personal copy of the library, makes their changes to their personal copy, then merges the files back in to the main. The exact workflow also varies by team.