Never use extension cords with portable electric heaters. An adult should always be present when a space heater is used around children. Electrical cords should never be run under rugs or bundled up to take up excess. This can cause the cord to overheat. Properly cover unused outlets to prevent accidental shock.
Fire needs fuel, oxygen and heat in order to burn.
Fire extinguishers apply an 'agent' that will cool burning fuel or restrict or remove oxygen so the fire cannot continue to burn. Small household fires can be quickly controlled by a fire extinguisher. Every home should have at least one fire extinguisher. But simply owning an extinguisher is not enough. You need to know how to use one properly.