Create a gravity variable, a gravity rate variable, a jump speed variable, and a jumping variable.
Set gravity rate to the rate gravity increases by per loop. Set jump speed to the initial speed the user jumps at.
If the user isnt on the ground (get this data with your collision routine), move them down by gravity, then increase gravity by gravity rate.
If the user is on the ground, reset gravity to 0, and jumping to 0.
When the user presses the jumpkey, check if jumping = 1, if it does, dont do anything, if it doesnt, then they must be on the ground, in which case, set gravity to jump speed. Assuming jump speed is a negative value, the user will move upwards, slowing in speed until they begin to fall back down again, accelerating in speed.
To determine if an object is standing on a surface, use raycasting (the INTERSECT OBJECT command). Set the starting xyz position of the ray to the player's position, and the ending xyz to the player's x and z position, with a largely negative y value, checking for intersection with any map object. This will cast a ray directly below the user, and tell you the distance the user is to the closest polygon below them. If the distance is less than or equal to half the user's y scale, then their feet are on the ground, if not, they're airborn.
Raycasting should be used for collision as well, for better results, and assurance that a collision will be detected no matter what speed the user moves at, but thats another story.
All of the methods above have been explained in huge detail dozens of times in dozens of threads, do a search and you'll find what you need.
<edit>
Heres a demo program, it should work, havent tested it though;
SYNC ON:SYNC RATE 0:AUTOCAM OFF:HIDE MOUSE
`Orient Camera
POSITION CAMERA 0,10,-400
`Make player object
MAKE OBJECT SPHERE 1,20
COLOR OBJECT 1,RGB(255,000,000)
POSITION OBJECT 1,0,OBJECT SIZE Y(1)/2,0
`Make ground plain
MAKE OBJECT PLAIN 1000,300,300
XROTATE OBJECT 1000,-90
`Variables
gravity# = 0
gravrate# = 0.005
jumping = 0
jumpspeed# = -1
groundDistance# = 0
onGround = 1
x# = 0
y# = 0
z# = 0
`Main loop
DISABLE SYSTEMKEYS:WHILE ESCAPEKEY() = 0
`Store player positions
x# = OBJECT POSITION X(1)
y# = OBJECT POSITION Y(1)
z# = OBJECT POSITION Z(1)
`Get distance to ground
groundDistance# = INTERSECT OBJECT(1000,x#,y#,z#,x#,-2000,z#)
IF groundDistance# <= OBJECT SIZE Y(1) / 2
`If theyre on or below the ground, reset their data, and reposition them on the surface.
onGround = 1
gravity# = 0
jumping = 0
MOVE OBJECT UP 1,(OBJECT SIZE Y(1) / 2)-groundDistance#
ELSE
onGround = 0
ENDIF
`Jump Routine
IF onGround = 1 AND jumping = 0 AND SPACEKEY() = 1
jumping = 1
gravity# = jumpspeed#
ENDIF
`Handle Gravity
MOVE OBJECT DOWN 1,gravity#
INC gravity#,gravrate#
`Refresh Screen / Orient Camera
POINT CAMERA x#,y#,z#
SYNC
`Repeat until exit key is pressed
ENDWHILE