Seniority is the hierarchy determines who gets a given assignment, be it a schedule or an aircraft type, or a position captain/first officer, etc. If two pilots bid for a given schedule, the senior one gets it. If two pilots bid for a vacancy in an aircraft at a particular location, the senior one gets it. If two pilots bid for captain in a particular aircraft at a particular location, the senior one gets it.
A pilot who remains in an airbus for thirty years won't get a 767 at the end of those thirty years, because there won't be any left, but unless a pilot is "seat-locked," he can bid and get anything that his seniority will "hold." Seat-locks apply to pilots who bid a particular position, such as a captain position in a 737. The pilot may be seat locked, meaning he can't leave that position, for a given period of time. A year, for example. After that year, he can bid another aircraft if s/he chooses.
A company may have a minimum experience level, experience in a particular type aircraft, etc, before they will allow a pilot to upgrade, or move to a captain position, in that aircraft, or they may set a minimum time with the company. Barring those restrictions, a pilot may put in his captain bid on the first day of class when he's first hired, and after that it's a matter of time until his seniority will allow him to get that job. If the most recent upgrade in that aircraft type at that location (Atlanta, 737, for example) is 200 pilots above him, then he's going to have to wait until each of those 200 pilots who wishes to upgrade, has had his or her opportunity...but also takes into account that any other pilot in the company who has the seniority to bid an upgrade in that airplane at that location, has had their turn in order of seniority.
Upgrades are not guaranteed; opportunities to upgrade are granted in order of request, starting with the most senior and working down. It's up to each person awarded an upgrade, to pass the training and checkrides necessary to hold that position.
Bids for aircraft and position are placed for a number of reasons, from pay to location; one may seek a given position because it's closer to home and means less commuting. Some positions go to very senior applicants, while others go quite junior.