Whenever you cast a creature spell, you may pay

. If you do, return target creature to its owner's hand.
A "creature spell" is any spell with the type Creature, even if it has other types such as Artifact or Enchantment. Older cards of type Summon are also Creature spells.
The ability is put on the stack immediately after you cast a creature spell, which means the creature that spell will become won't be a legal target.
The ability will still resolve even if the spell that triggered it gets countered.