Fuel cells generate electricity by converting the chemical energy of hydrogen into electrical energy through an electrochemical reaction. The central component of this process is the catalyst, typically made of platinum, which facilitates the reaction between hydrogen and oxygen to produce water and electricity.