What happened is heat damage. Yes, your hair can lose its ability to curl and will remain permanently straight, and damaged. This happens when you use heat that's too high – it doesn't have to happen over time. One incident with a too-hot curling iron, flat iron or hot comb and this could happen. Even if you wear your naturally curly hair straight all the time, this isn't a result you want because the hair has been fried straight and is not healthy.
The only solution for the damaged hair is, unfortunately, to cut it off. If you have several damaged sections all over, you'll need to get rid of them, which means an overall cut. If you're trying to grow your hair longer, this is probably the last thing you want to hear, but it's necessary for the overall health of your hair. Once you cut off the damaged parts, you can start or return to a healthy hair regimen.