There are two ways to power an automobile with hydrogen. The first is to burn the flammable gas in an internal combustion engine to create power. This allows automakers to use existing technology and manufacturing processes, but requires significant redesign of existing vehicles. Since hydrogen lacks the energy density of fossil fuels like gasoline or diesel, you need to have more of it onboard to travel an equivalent distance. As hydrogen gas is extremely flammable, it must be contained in an isolated, reinforced storage tank away from the passenger compartment of the vehicle.
The second way to use hydrogen to power an automobile is by combining it with oxygen in a fuel cell to create electricity. This electricity can then be used to power a vehicle's electric motor. Fuel cell vehicles don't require recharging via electricity; instead, the hydogen supply is replenished as needed by the driver.