Synchronizing sounds

Firstly, is it possible to synch sounds? i.e. have a base track (melody) playing, then on mouseUp (or something) bring in a beat or another sound element, synched to the underlying base track?

If someone has done summin similar, can you post a link or PM me, I am very interested to discover if this is possible and how to achieve it.

Cheers in advance.