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.
一緒に is a casual, everyday way to say 'together with', while と共に can also express simultaneous change or is used in more formal writing.
に伴って 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'.