Good Gravity Code

I am wanting to make a game, and I need a gravity code that works great. I want gravity, a jumpibg code, and then a code to make something stop when it hits another thing. HELP!