Flow occurs when our perceived abilities match our perceived challenge. If your perceived abilities are greater than your perceived challenge, the outcome is boredom. On the flip side of the coin, if your perceived challenge is greater than your perceived abilities then anxiety rules. Now, when your perceived abilities is equal to your perceived challenge, you're probably "in-the-zone". Notice how I have italicized the word 'perceived', the reason I did this is because perception is everything. What you believe your abilities and challenges to be, is more important than what they actually are.
If you aren't currently experiencing flow, your abilities aren't equal to your challenge. If you are bored at school, practice, or even during your games, you need to challenge yourself. You're probably going through the motions doing just enough to get by without experiencing flow by pushing yourself to the next level.
Or, you might be trying to do more than your perceived ability is able to handle. Take it down a notch, you don't have to be the best player on the team right now, but you can be the best player YOU can be right now. Focus on what you can control and the anxiety will drop.
The theory of flow also works for performance outside the athletic arena. You could experience flow at work, in your relationships, at school, or at church. Flow is not something you can force, however, by making sure your perceived abilities match your perceived challenge, you put yourself in a better position to experience it.