Obligatory: IANAL
My understanding is that you gain a trademark by using a mark in trade, so basically as soon as you create a name/logo and start using it, it is a trademark, and it can be enforced. However, there is an optional step of "registering" your trademark with (in the US) the USPTO. Doing this gives you some degree of additional ability to protect/defend your trademark, but I don't know how to quantify how much so.
I did a little bit of research into registering trademarks a while back, and came to the conclusion that it was something an engineer can do on their own, with a little work. There are plenty of books and websites out there that explain how to do it.
Caveat? The only one I can think of off-hand is that it does cost a little bit of money, and some time.