How to locate the collision between the player and the object

For example, I want to let my character jump on a platform with BoxCollider2D, If the jump from the bottom, BoxCollider2D is deactivated, if my character is on the BoxCollider2D will be activated and my character can stand on it …

What should I do?

The function OnCollisionEnter has an Object of Type Collision as argument.

Collision2D.GetContacts is probably what you are looking for.