Aaron first offered the bull as a sin (purification) offering to cover his sins and the sins of the other priests ( Leviticus 16:6). Then he cast lots to decide which of the two goats would die as a sin offering for the people and which one would be sent into the wilderness ( Leviticus 16:7-8). Then he sacrificed the goat that was to die ( Leviticus 16:9). Finally he brought the other goat before the Lord and then dispatched it into the wilderness ( Leviticus 16:10). [source][source][source]