When you click a Pokémon/Egg, you will have the option to put it back in the Shelter if you don't want it. If you adopt a Pokémon, you will have the option of naming it. Once you have claimed that Pokémon/Egg, you cannot release it for the next 12 hours, so be sure to make up your mind before claiming it. If a Pokémon is not claimed after a certain amount of time in the shelter it will be released to the wild.
Keep in mind that in order to adopt a Pokémon from the Shelter, you must first have a Shelter Pass. You obtain the Shelter Pass as a reward from hatching your first egg.