Titans spawn from spawn point (sometime called "lanes"). They are two kind of spawn points : the off-maps one, signaled by a skull and an arrow, and on-site spawn point (volcanoes or toxic pools), signaled by fours arrows. The on-site spawn points usually only spawn the weakest type of titans (e.g. only Gidrus Titanus and Gidrus Gigantus on Titan).
A spawn points will alway spawn one type of basic titans in huge number, and most of the time will also spawn the associated leader titans in small quantities. The type of titans will not change if you retry the level with the same difficulty, so you can scout what spawn what, restart, and build your turret according to this information.
The only exception are bosses. They spawn from a random off-maps spawn points, which will not spawn anything else. It mean you can't predict where the big one will appear, but with luck you can silence a particulary troublesome spawning point.
Non-leader titans dies when they attack a non-barricade buildings. Leader titans dies after 4 to 5 attacks against non-barricade buildings. In every case, attacking barricades cause no problem to titans.
You can place a non-barricade building on top of a titan to directly kill it. Your newly-spawned building will suffer some damage, however.