What happens when I transfer a Pokémon to the Professor?
When I catch a Pokémon or when I select it in the menu I can select an option "TRANSFER"?
What happens when I transfer it to the Professor?
Transfer the Pokémon to the Professor You receive Candy in exchange for transferring a Pokémon. Be careful—you can’t get the Pokémon back after you’ve transferred it to the Professor.
cited from the support page
You receive 1 candy per pokemon transferred, regardless of the pokemon's level of evolution or CP. (Hat tip to @CreativiTimothy) for sharing this in the comments.
Transfering to the Professor is a way of permanently removing a Pokemon from your inventory.
In exchange for a transfer, the Professor will give you some Candies, that can be used to power up and evolve a Pokemon. Note, however, that these Candies are limited to the "family" of Pokemon denoted.