Members of ANBU are hand-picked by the Kage. Usually, the Kage will choose a Special Jounin Rank or Higher as a member of ANBU at his/her discretion, but there is a single alternative method to joining the ANBU.

You must travel to the Land of Darkness and assassinate a high-ranking military commander behind enemy lines without being discovered. If you fail the mission, and manage to return from the Land of Darkness, you will not be able to apply for the ANBU ever again. That being said, the ANBU Selection Exam is a one-time offer to join the ANBU.