By using Hammer.
Seriously though - that's a very broad question, though
this VDC article should tell you what you need to know. Also, the isolated gamemode logic for TC can be found in
the Ultimate Mapping Resource Pack for convenient copy-pasting into your own project.
Having said that, it's worth noting that TC is a very difficult gamemode to map for, so if you're not that experienced with Hammer, I'd advise you go for a more straightforward gamemode like Attack/Defend or King of the Hill for your earlier projects.