how do you reformat the hdd

on my ps3 it wont let me save or load games, and i asked around. i found out that reformating the hdd should make it work   (i’ve already tried all the safe mode stuff)   so how do i reformat the hdd?