Primary energy is the energy at source, whereas delivered or final energy is the energy used in a building. In the case of grid electricity, primary energy is the energy used at the power station to generate electricity. There can be significant energy losses in the generation process, added to additional losses transmitting energy through the grid. The gas, oil and biomass burned directly in buildings with boilers or stoves are typically assumed to have a primary energy factor of 1.1, meaning 1.1 kW of energy is required at source to generate 1 kW of fuel for the building. (Though we wonder about the primary energy of oil in particular, given the fact that cruder, harder to access oil sources are now becoming more common - which may require more energy to extract and refine.)
It's also worth bearing in mind that 1 kW of fuel does not necessarily mean 1 kW of heat. A properly operating high efficiency boiler may be more than 90% efficient, meaning 1 kW of fuel delivers more than 0.9 kW of heat, whereas a properly operating heat pump may generate 3 or 4 kW of heat per kW of electricity.