Most likely there is dirt or lint around the track ball. Do you carry it in your pocket?
Step 1: Turn off the device. Press and hold the trackball and roll it in all directions for a minute or so.
Step 2: While pressing the ball down, blow some canned/compressed air all around the track ball.
Step 3: Dip a q-tip in alcohol and clean the ball.
Step 4: Turn the BB back on and it should work.
Step 5: Buy a holster and don't carry it in your pocket.
If this doesn't work, you might need to take it apart to clean it. A quick search on "clean track ball" resulted in this: How to clean your 8300 Blackberry trackball(Pic and guide)