Unlike popular belief(by girls). Men don't have manual controll of the erection of the Penis. Randomly at least once or twice a day a man will have an erection(usually in the mornings and one more time later towards evening).
By thinking erotic thoughts or looking at something arousing a man may have an erection which, once it pops, it won't stop. The erection will go down by itself over time or it can be calmed down by masturbation.
Yes, i'm a Nurse and i happen to be an expert on this subject. Feel free to ask.