yikes -- it's my understanding that males can "display" for a short time, but then it's supposed to retract. he may have what's called a penile prolapse, if you're sure that what you're seeing is indeed his penis. otherwise it might even be an intestinal prolapse. either way, he should see a vet, because the longer it stays out, the greater the chance that he gets an injury, an infection, et cetera.

in the meantime, maybe try giving him a soak in some warm water and see if that helps him draw it back in?

i found this information but cannot vouch for it (link below).
Penile Prolapse