If only the glass is cracked, only the glass needs to be replaced.
But if you don't have any experience working on cellphones you might end up breaking the digitizer, the LCD screen and a few other parts. Take it VERY slowly, make sure you know what you're doing, come back here and ask questions if there's any part of the process you're not sure of before you guess wrong and break something.