If this is a 120 volt extension cord:
The black wire should be the hot wire. But if the receptacle that it plugs into is wired incorrectly then the white wire could be hot instead.
Most receptacles have brass terminals/screws on one side and chrome or silver colored terminals/screws on the other side.
The hot wire that feeds the receptacle should always be attached to the brass colored terminal side.
The common/neutral wire that feeds the receptacle should be attached to the chrome or silver colored terminal side.
As always, if you are in doubt about what to do, the best advice anyone should give you is to call a licensed electrician to advise what work is needed.
Before you do any work yourself,
on electrical circuits, equipment or appliances,
always use a test meter to ensure the circuit is, in fact, de-energized.
IF YOU ARE NOT ALREADY SURE YOU CAN DO THIS JOB
SAFELY AND COMPETENTLY
REFER THIS WORK TO QUALIFIED PROFESSIONALS.