It depends. Normally you can just set the ActivateOnDefault=False in the feauture. Otherwise you can add an EventReceiver containing code to "turn off" the feature(s) you want.
You do this by opening your solution in Visual Studio > right click on the solutions top-level > Add new item > Event Receiver <-- By this stage a dialog will open in which you choose on what occation this EventReceiver should trigger and what phase of an event you want to manipulate, in this case the "Web Provisioned" phase. It then generates an EventReceiver in which a WebProvisioning method will be available to modify for your needs.
I hope this helps.