When you encounter wild Pokemon, there is 'Escape' icon at the top left corner of the screen. By tapping the icon, you can run away from them. The escape function may be used for saving Pokeballs.
Where do the wild Pokemon go?
They stay on the map
After escaping from the wild Pokemon, the Pokemon stays on the map. By tapping it, you can try to capture again.
Note:
If the Pokemon runs away from you, it does not appear on the map again.
How about CP of the Pokemon?
The value of CP does not change
After escaping wild Pokemon, you can try to capture them again as mentioned above. If you do so, the Pokemon's CP do not change. They appears having same CP.