A gas-operated semiautomatic operates on gas bled from the barrel. This gas is channeled to the bolt operator, which blows the bolt open and ejects the spent shell casing. A heavy spring then returns to bolt carrier to the closed and locked position on the next round. In the case of weapons with free floated firing pins (SKS, AR-15, etc.), the inertia of the firing pin carries it forward and it strikes the primer as the bolt closes. (The "slam"). Generally this will dimple the primer and leave a small indent. This isn't anything to worry about as primers for centerfire .223 and 5.56mm are pretty "hard" and aren't likely to be set off by this impact.
Early M-16s had a problem with slamfiring because of the firing pin design. Eventually Colt redesigned the pin to be lighter and therefore carry less energy into the primer.
Slam-fires are pretty rare in modern ARs provided they are well maintained but they can be caused by a broken or protruding firing pin, foreign matter on the bolt face that is carried into the primer, foreign matter in the firing pin assembly that prevents it from retracting sufficiently, overly soft or poorly seated primers, or other malfunctions.
As for titanium firing pins, they are probably not worth the headache. Indeed they are lighter and may reduce the already small chance of slamfires, but titanium also does not handle impacts well and can be brittle. A broken or cracked titanium firing pin is a lot more likely to cause a slamfire than a regular pin.
It should be noted, however, that repeated chambering of the same round increases the likelyhood of a slamfire, or of a hangfire (slow to ignite) or misfire (failure to ignite) due to damage to the round's primer. If you chamber and clear your rifle on a regular basis, make sure you change out the top round so that you don't rechamber the same round more than once or twice.
Finally, always point your rifle in a safe direction when chambering live ammo. As with any machine, there is always the possibility that something will go wrong and the round will fire. If you are chambering your home-defense gun, ride the charging handle and use the forward assist to lock the bolt forward, always keeping the muzzle pointed in a safe direction.