Safe bumper - what should it be made of?

Cars manufactured in the last decade have many safety systems that we do not even notice during everyday driving. One such invisible element of passive safety is the bumper that is harmoniously integrated into the vehicle’s body. What is it made of and what is its function?