Pet a cat when you encounter one on the street.
A feral cat won't let you get close. If a cat is friendly it probably belongs to one of your neighbors.
I encountered a stray cat in my back yard when I was 5 years old. An attempt to pat it yielded a very painful bite on my little hand.