The idea behind starving a fever being the avoidance of giving your body anything to do that would raise its temperature, like digesting stuff or converting sugars to fat.
I’m not sure of the supposed wisdom behind feeding a cold though, other than the idea that you need to “keep your strength up” to fight off the infection. Personally, I’m never that hungry when in the grips of a nasty cold.