At this time of year breeding is uppermost in bird thoughts. Not all birds have a penis, or intromittent organ, but ducks do. The male sex organs are normally tucked within the cloaca, but you might see them after the bird has been sexually active.
As you can see in the video, the member usually retracts. But if it stays out for an extended period, there’s a risk of it being damaged and then getting infected. Other birds may take an interest and cause injury, or it may get snagged. This is another area where we need to keep up our observation and monitor every aspect of our birds’ welfare.
If you are certain that it is not going to retract and the bird needs assistance, you'll have to catch him. You can try bathing the penis in lukewarm water and gradually reduce the temperature. Cold water helps to reverse the process. If required you can use a lubricant, such as KY jelly, to gently pop it back in. If this fails, you may have to take him to the vet to have the phallus removed.