How do sales resources (team members) get assigned to an opportunity?

Sales resources (team members) are assigned to an opportunity either automatically by the assignment process, or when you add them to the sales team while editing an opportunity.