Hitting an object

I am making a simple game where you drop a ball and if it hits a moving object something happens. Not sure the correct approach. Do you try to match the x,y points and if they line up you trigger the event?