The majority of hydrogen (about 95%) is produced from fossil fuels. Among other ways, hydrogen can be produced by electrolysis of water, but hydrolysiselectrolysis requires electricity to start with. In most cases it would be inefficient to go through the processes of extracting hydrogen to use as fuel for generating electricity if the fossil fuels themselves will do the job.