Does it look like a pink string? If so, that's his part. :D
Just keep an eye on him to make sure it goes back in. If it doesn't you may need to put some KY Jelly to help. If it still doesn't go back in, a vet visit may be in order.
Males like to let their junk hang out sometimes.