'stop to do something' means stop doing something to do something else. E.g. I stopped to talk to my friend. Meaning that I was walking along the road, on my way to work and I saw a friend of mine, so I stopped walking so that I could say hello and chat for a while. Stop doing something= that you don't do something any more. E.g. I stopped talking to my friend (I'm angry and I'm never going to talk to her/him ever again)