Expresses doing something together with someone/something, or two things happening at the same time. Also used in the pattern 'A とともに B' to mean 'as A changes, B changes' or 'along with A, B'.
I celebrated the New Year together with my family.
As I've gotten older, my physical strength has declined.
に伴って highlights a consequential or accompanying change in a formal context, whereas と共に more broadly covers accompaniment or simultaneity.
与(むた)is the archaic classical form meaning 'together with', while と共に is the standard modern expression used in contemporary Japanese.
Combination of the case particle と ('with') and the noun 共 (とも, 'together'), followed by the particle に. The phrase grammaticalized into a fixed expression meaning 'together with' or 'as'.