I saw a friend have soldiers in his game, he had no mods, and it was not a Game-Over situation. How can I do that? I accidentally did It once, but I don't know how.
You can't. I'm not sure how you were mistaken or are misremembering here- you should ask your friend instead.
There is no way in an umodded game to call in the army. The closest you can get is Riot Police- perhaps you were thinking of them?
The army can also show up in Escape Mode on the console version. Besides that, however, they only appear in the Uncontrolled Riot failure state.