Pretty much the same way that anyone else can be moral: by considering their actions, weighing the consequences, and deciding whether they are doing more harm than good to themselves and other people.
Despite what evangelists tell you, the threat of hell is not what stops most people from, say, going on a mass-murdering spree. Even if there was no hell, there are still bad consequences for bad behavior. Our society has laws that threaten criminals with fines, imprisonment and sometimes death. And even if those laws didn't exist, there would still be the threat of punishment from other sources. For instance, if you commit a murder, the victim's family and friends might come looking for revenge. Nobody likes to be taken advantage of. The justice system just makes the whole process a little more orderly, which is a good thing.
However, it seems like the threat of punishment and the promise of rewards is not really the only thing that keeps people from being bad. With or without religion, people don't like to be hurt, and they usually recognize that other people getting hurt is a similarly undesirable thing. Jesus didn't invent the principle of treating others the way you would like to be treated; it was around for centuries before. When people are in danger of being mistreated, they seek out protection through cooperation and relationships. Society is simply a much larger extension of those relationships.
With rare exceptions, people (atheists included) don't really have the urge or desire to run out and kill or steal or otherwise harm other people. And honestly, when people say "If it weren't for God holding me back, there would be nothing to stop me from being a criminal", we worry about them. If your grasp of right and wrong is so shaky that you can't stop yourself from doing bad things, and you need someone threatening you with eternal punishment to keep you in line, then we wonder how safe you really are to be near
Posted in: About atheism