You let it flower untill its ripe which can take 8 to 12 weeks but most common is 10 weeks, depends on the strain and its enviromental situation.
How do u tell when its ripe, most of the pistols are turning orange/brown and receding into the bud (no bright white pistols reaching for the light), the calyaxes have swelled, and some trichomes have started to amber.