pinch the foreskin shut, and piss hard. Then let go. That will get most of it out, and piss is sterile. Make a cup out of the end of it, and flush with water.
Have you had a tight foreskin all your life? If you have, start by pulling the foreskin out away from your body. After a few weeks, get the small fingers in, and gently pull apart.
Gradually work up, to bigger and more fingers. In six to eight weeks, you'll be fully retractable.
If this is something new, you might have a yeast infection. It can happen to anyone, male or female, circumcised or uncircumcised. Anything over the counter for wormen, will work on a man. Clear the yeast, and start the stretching. If it doesn't after 8 weeks, find a sympathetic doctor (one that doesn't mention circumcision), and get betamethasone cream. Applied to the outside, and combined with stretching, it can usually fix the hardest most stubborn cases, in 6-8 weeks.