Event handlers in Blender
You setup event triggers using game engine logic bricks within the Logic Editor window

There are several sensors available, collision and near would work. (Touch appears to have disappeared from recent versions) These sensors can then run python scripts or initiate other actions using available actuators.

A search on youtube for blender game engine tutorial will bring up several options to show you the basics of using the game engine.