The photos I like are showed on my friends' news feed. How do I stop that?
Sharing is the core nature of Facebook and I don't think you can hide it partially, the way you intend to. I don't remember having an option not to show all or some of the likes, or comments, etc. But there is a workaround possible now: with the new version of the privacy settings, you can share only with a subset of friends while hiding your activity from others. But it's all your activity, not just parts of it.
See this question for details of how to exclude some friends from viewing your activity.
Otherwise, just like x3ja said, you would have to stop liking the photos.
It shows if your friend has a public profile. If you like a photo of their's or their status it shows on all of your friend's newsfeeds. A way to tell if it is something your friend posts, is there is an icon that looks like a globe meaning it is public.
I always look for this before "liking" anything and encourage others to do the same.