A major league team's Director of Player Development determines where a given player will be placed in the farm system, in coordination with the coaches and managers who evaluate their talent.
Players will play for the team to which they are assigned for the duration of that season unless they are "called up" (promoted to a higher level), "sent down" (demoted to a lower-class team in the major league club's farm system), or "released" from the farm system entirely.