To get stains off of the flower: Just use soapy warm water on a white wash cloth and rub gently. If the stain is heavy then use a small amount of woolite.
To get stains off of the hat: Remove the ribbon and do the same as above or if it really needs a good wash you can hold onto the flower so that it doesn't get too wet and soak the hat in warm soapy water. Rinse and let air dry.
DO NOT PUT YIN THE WASHING MACHINE OR DRYER!!
The hat will be clean but the flower will be ruined.