To 'get cold feet' is to become disheartened or timid, losing one's previous enthusiasm or courage.
Why this term was coined isn't at all clear. On the face of it there doesn't seem to be any obvious connection with the literal meaning of cold feet and the meaning of the phrase.
There are a couple of citations of the phrase from 1896, including this from Stephen Crane's novel Maggie, a girl of the streets, 1896:
"I knew this was the way it would be. They got cold feet."