Usually they control the military, yes. Most dictators reign because they were generals in a civil war and eventually won. It's also pretty hard to retain control in a country if you don't have power over the military. E.G Egypt recently, when the military kicked the elected president out, he was shit anyway, as he was Muslim Brotherhood.