By default, pokemon have a 90% chance to be captured.
If you've caught a pokemon recently, this chance lowers itself to different percentages, eventually fully wearing off and going to 90% again after 8 hours. If you try and catch another pokemon within 2 minutes of your last catch, your chance will only be 5% for example.
Shinies currently have their capture chance locked to 95%.
If you see "The pokemon ran away"! that means you actually took too long from encounter -> catching that your session expired / was rebuilt.