Favorite star is at the top right corner of the screen showing details of Pokemon. Starred Pokemon cannot be transferred to Professor Willow. It is very easy to add or remove the star. This page notes how to prevent transferring your favorite Pokemon unintentionally by the function.
How to use favorite start
There are two ways to add a star to your favorite Pokemon. Both either ways are very easy and shown below.
1. Tap the star-shaped icon at the top right corner or
The first way is tapping the star-shaped icon. It gets colored.
2. Tap the menu icon at the bottom right corner
The second way is tapping the menu bar.
3. Tap 'FAVORITE'
After tapping the menu bar, you see twp options: 'FAVORITE' or 'TRANSFER'. Tap the transfer button.
4. See the star get colored
Now the star icon gets yellow-colored. Your Pokemon cannot be transferred with the favorite star.
Your Pokemon also have the star in your Pokemon storage.
5. Favorite pokemon cannot be transferred
If you try to transfer starred Pokemon, the message 'Cannot transfer a favorite Pokemon!' pops up.
If you want to transfer starred Pokemon, remove the favorite star by just tapping the star as you did at step 1.