All computer chips and devices operate at very low voltage, like 1.5 or 3 volts. An EMP can overload these devices and fry the chips. An EMP could knock out the power to the entire United States. If it did so, Newt Gingrich said it would take 6 months to a year to get power back on. It would take every powerline person to flip all the switches. They estimated it would kill around 100 million Americans. Why, is because all canning, freezing, and refrigerated equipment handling food would go down. Sewage and water treatment facilities would be off line. Now some have back up generators, if the generators can come on, but getting fuel, natural gas, propane, gasoline, would require pumping stations along the pipeline if they can get power. About half the vehicles wouldn't run, including newer diesels. Trains might still be able to operate, but getting diesel could be a problem. Hospitals would run out of emergency power fuel. Life support, and anything that requires power would go down.
Newt Gingrich wanted the government to spend the money to fortify the grid against EMP's. But no, congress ignored it and kicked the can down the road. Oh, even a solar flare aimed directly at earth would knock the power out. Only a matter of time.
I've read you need to stockpile at least 1-2 year supply of food, ground all your equipment or put it in Faraday cages. Some survivalists use metal roofs and put screen wire under their outside walls and ground their roofs and walls to protect their equipment inside. Problem is even if you protect your freezer, refrigerator, or computer equipment, you still have to have a protected generator and enough fuel to last a year or two.