1 watt is defined as 1 joule/second. So if you multiply a watt times seconds, you get Ws which is also a joule.
So 1kW is 1000W, and an hour is 60 seconds x 60 minutes.
So 1kWh = 3600kWs = 3,600,000Ws = 3,600,000J
So kWh x 3600sec/hr x 1000W/kW = J
One kilowatt-hour is equal to 3600000 joules:
1kWh = 3600000J = 3.6⋅106J = 3.6MJ
So the energy in joules E(J) is equal to 3600000 times the energy in kilowatt-hour E(kWh):
E(J) = 3600000 ⋅ E(kWh)