Ground Code Needed

Well, basically i need to make my game so my mc doesnt fall through the ground when he jumps or walks, coz so far all he does is jump, then fall through the floor. Does anyone have a code for a way to fix this, or advice on how to do it?