A reference frame must be non-moving? I'm tough in school that a reference frame must be non-moving; For example if I take as reference frame the waves of the ocean, i will have the impression that i'm moving, but I'm not. But if movement is relative, how to distinguish between a reference frame that is not moving and one that is moving? It is impossible i think!
 A: Typically we choose a reference frame so that there are no fictitious forces. For example if you choose a frame static wrt the surface of the Earth there is a downward force which is real and caused by the Earth's gravity. If you're riding on a rollercoaster and choose the reference frame to be the roller coaster car then your frame will be subject to fictitious forces as the car goes up and down and round corners.
A reference frame doesn't necessarily need to be static because a frame moving at constant velocity doesn't have any fictitious forces. The main thing is that the frame isn't accelerating. As you say, movement is relative, so there is no absolute way to say which frames are stationary and which are moving at constant velocity. However in Newtonian mechanics and Special Relativity acceleration is an absolute quantity so it's always possible to tell which frames have a non-zero acceleration and which are not accelerating. In General Relativity even acceleration is relative, but that's a discussion for another day.
A: 
how to distinguish between a reference frame that is not moving and one that is moving?   

Every measured is taken from some particular reference frame. Suppose you are watching the waves of ocean while standing still on earth. Let's name your frame of reference as $S$  and that of waves of the ocean as $S^{'}$. You will make every measurement w.r.t to your $S$ frame. when you calculate the position of waves w.r.t $S$ frame you will find the position of waves changing. From this observation you conclude that the frame of reference attached to waves i.e. $S^{'}$ is moving.
Let there be another observer in a sailboat on that waves. That observer in sailboat will make his own measurements of everything say time, length etc's. In a technical sense this observer will make his observations w.r.t $S^{'}$. Observer in the sailbot will found that you (i.e $S$) is moving and he will conclude that you are moving.
The misunderstanding you might have is to switch the observers $S^{'}$ with earth because w.r.t earth you are standing still and waves are moving.  
Here we are dealing with velocities << speed of light. Some remarkable observational difference b/w the readings of $S$ and that of $S^{'}$ occurs in the regime of high speeds.  
A: 
how to distinguish between a reference frame that is not moving and
  one that is moving?

Moving with respect to what?  A reference frame is at rest with respect to itself and moving with respect to other, relatively moving frames of reference.
In other words, motion is not a property of a reference frame; there is no absolute rest.  
Thus, we can only meaningfully speak of the relative motion of two reference frames.
If you speak of a moving reference frame, you must keep in mind that this is sloppy shorthand for "a relatively moving reference frame" where it is understood that the motion is with respect to one's own reference frame.
