Not Quite Sure How OnCollision... Works

I’ve been having trouble with this for a long, long time. I can’t seem to get this code to work, no matter what I try.

var player : GameObject;
var apexHeight : int;
var normalHeight : int;
var onTop : boolean;

function Start(){    
	player = GameObject.Find("Player");
}

function OnCollisionStay (collisionInfo : Collision) {    	
	if(collisionInfo == Collision.player)
	    rigidbody.AddForce(Vector3.up * 50);    	
}

Replace your if with:

if(collisionInfo.gameObject == player){