They are related, but separate, issues:
Do not use extension cord
This is in general good advice for almost any appliance that is "permanently" installed. By "permanently", I mean "it is going to stay in one place and run for weeks, months, probably years without being moved or disconnected. There are several reasons to not use an extension cord in these cases:
This applies to using an extension cord with anything.
This is specific to refrigerators and freezers. If you plug a light or a TV or a computer into an extension cord and somebody accidentally disconnects the device from the extension cord, there is no harm done. You find out it isn't working the next time you use it and you plug it back in. But with a refrigerator or freezer you have two big problems: spoiled food that you know about (which is bad enough) and spoiled food you don't know about (which is far, far worse).
The spoiled food you don't know about is because your refrigerator was unplugged for 6 hours. It got to 50 degrees for a couple of hours. Most people are notoriously bad at judging temperatures, so they stick their hand in, decide "it still feels cold" and figure everything is OK. Or even worse: Someone unplugs it, someone notices the problem several hours later and plugs it back in but doesn't check anything, a few hours later the temperature reads 38 F and nobody knows there is even a possibility of a problem.
Most beverages (except milk), fruit, vegetables, fresh eggs - all fine. Raw meat, lots of cooked foods - really dangerous.
So an extra, very plausible point of failure is particularly bad for refrigerators and freezers.
A good quality extension cord with a ground wire and large enough wires (at least 14 AWG) can handle 5A of load without any problem. But there are some really cheap "lamp extension cords" that have thinner wires (e.g., 16 AWG) and no ground wire. Even those should be OK with 5A, but of course there is nothing to prevent 15A (or 20A if there are multiple receptacles and used on a 20A circuit), so the cord itself can be overloaded relatively easily. And if the appliance has a ground wire and you use a 2-wire cord with a "cheater" you have more possible problems because the ground goes...nowhere.
Provide a separate circuit
This is where it gets interesting. Generally speaking there is no need for a separate circuit. I have a lot of stuff in my house on one circuit, including a refrigerator/freezer and separate freezer in the basement. I finally (or rather, my electrician did) separated things a bit so that the computer and laser printer are on as separate circuit from the refrigerator/freezer and freezer because I could see some interaction when different things powered up at the same time. But does each device really need its own separate circuit? Unless the instructions truly require it (not just "recommend") it, there is no electrical need for that, not with appliances that draw < 7A each (e.g., less than 1/2 of a 15A circuit). So sharing with lots of stuff is not such a great idea, but with some other stuff that doesn't have large power requirements is generally fine.
There is an additional consideration specifically for a refrigerator/freezer in a kitchen: GFCI. Generally speaking, nearly all 120V circuits in a kitchen require GFCI protection. About the only exception in the latest code is (I think) lighting circuits that don't have any receptacles in the food preparation area. But there is a concern that (a) some refrigerators have a tendency to cause GFCI trips (this should be less frequent with newer appliances designed in the GFCI era) and (b) an unnoticed GFCI trip on a circuit shared with the refrigerator can cause a serious food spoilage safety problem. A common solution to this is:
- A separate single receptacle exclusively for the refrigerator. It might be on a separate circuit or it might be on another kitchen circuit but connected in a way that it does not have GFCI protection (e.g., split off the circuit prior to a GFCI/receptacle).
- The receptacle is placed so that it is more than 6' away from all sinks.
- The receptacle is not counted as part of required countertop receptacles.
Many jurisdictions and/or inspectors will allow this exception to a blanket "GFCI for everything in the kitchen" because of the concerns about food spoilage and being outside the letter of the law with respect to 6' from sinks and required countertop receptacles. Just keep in mind that some inspectors may insist on "everything in the kitchen must be GFCI" even though that is not strictly speaking the rule.