Hydrogen is naturally found combined with other elements as part of substances like water, natural gas or compost. Energy is needed to extract it from these substances.
Clean, or renewable, sources of energy can be used to do this. They largely avoid make global warming worse.
At present, though, it is more expensive to use them than it is to use energy from coal or gas.