First try adjusting the cable tension. Shift into whichever gear is highlighted in red on the shifter window. Then, clean off the little clear plastic window on the hub down near the dropout. You'll see two little marks, which should line up. (If your hub is older, it may have two little metal fingers instead of marks inside a plastic window.) Twist the threaded adjusting barrel of the shifter cable, usually located on the shift lever, until the two marks line up.
If your grinding is still there after the adjustment, then you'll need to think about having the hub itself serviced.