Why would some times your turn signal work and some times not work?

I have a 2001 ford explorer that was doing the samething. The trouble started when the ouside temperature got cold. I replaced the flasher unit and have not had a problem since.