You want to retract your foreskin and wash as you normally would wash your penis, everyday or so.
If you've never done this you will likely absolutely have a build up of smegma, which could be the cause of the smell. If you've engaged in sexual activity and have no other symptoms then this is highly likely.
It will be very sensitive at first and make take practice learning how to retract yourself. Be slow and gentle and listen to your body. once retracted it should naturally sit behind the head of your penis. Gently using your finger you should be able to remove any detritus.