play a sprite on collision

I need a different sprite to play as soon as an image collides with another image. also how do I make one image leave when they collide? thanks!