Each shelter's adoption process is different.
They put the pet back, and you go up to the shelter desk, give them your photo ID, pay the adoption fee (average range is $25 to $125), and get copies of the pet's vaccination records and sterilization certificate so you can get him licensed.
You take your new pet home!