You've got three (or three and half) options:
Single action (SA). In which the slide, as it flies back after a shot, cocks the hammer (or resets the striker). All SA semi-autos have the option of cocking the hammer and engaging a safety.
Double action only (DAO). In which the hammer is drawn back and released by the trigger. The slide does NOT reset the hammer when the slide cycles. Many gun manufacturers make DAO versions of their DA/SA guns.
DA/SA. In which the the first shot works like DAO, in that the trigger sets and releases the hammer. But with following shots, the slide sets the hammer. Most semi-auto pistols (SIGS, Berettas, S&W, Ruger and [slightly different, but the same idea, Glocks]) work this way. A few of these guns -- very few --are available as SA only, as an option.
A few guns take DA/SA (or as FEG says SA/DA) a step farther, and let you cock the hammer for the first shot (exactly as with a SA pistol), and lock it, or start hammer down, as with DAO. H&Ks, in some models, let you do this. CZs, in most models, let you do this.