There are three different ways to become a Gotei 13 captain:
1- Captain proficiency test: A test which requires the ability to perform Bankai. Presumably, most Shinigami become captains using this method. At least three existing captains, including the Captain-Commander, have to witness the test.
2- Personal Recommendation: To have personal recommendations from at least six captains and approval from at least three of the remaining seven.
3- Trial by Combat: To defeat a captain one-on-one with at least 200 witnesses from the captain's division. Kenpachi Zaraki is the only known current captain to have achieved his rank using this method. This method is seen as being the exceedingly rarest of the three as well as the least refined. The method is commonly looked down upon by some captains as barbaric compared to the other refined methods. This method also allows one to bypass having the mastery of Bankai or other possible abilities that a captain would otherwise be required to have knowledge of, as it allows no judgement from captains who would require those skills as a prerequisite to join their ranks.