commander-in-chief; supreme commander
Military or historical use; refers to the highest-ranking officer in command.
He serves as captain of the soccer club.
He was appointed commander-in-chief of the allied forces.
Common in sports and club activities; the leader of a team.
彼はサッカー部の主将です。
He is the captain of the soccer club.
Our army struck down the enemy commander.
The team chose her as captain.
The newly joined player was appointed captain.
司令官 refers specifically to a military commanding officer, whereas 主将 can mean either a military commander-in-chief or, more commonly today, a sports team captain.
部員 refers to an ordinary club/team member, in contrast to 主将, who is the team's leader or captain.
大将 is a specific military rank (general/admiral) or a casual term for a boss, while 主将 means the person in command or acting as team captain, not a fixed rank.
From 主 (master, chief) and 将 (general, leader). The compound originally referred to a military commander-in-chief and later extended to sports team captains.