Smart Contracts: How do you direct a Transaction to a Smart Contract?

When Smart Contracts arrive on the Cardano blockchain, how do you route a particular transaction to a specific Smart Contract?

Not all Smart Contracts will be relevant to all transactions - so how is this managed?
Also, If there is a bug in the Smart Contract - how does it get fixed - as the network is meant to be immutable?