Veins essentially form when extension in a rock produces a crack.
1 Local extension is possible in a number of tectonic environments. Obviously if we have regional extensional tectonics, there will be plenty of regions in the crust that are under extension. However, locally during compressional or strike-slip tectonics we can get extension. Both these regions are where veins may form. 3 Alteration Assemblages Veins often have alteration haloes surrounding them.