A warning is for something like pushing or holding the player while they try to get away or holding from behind. Generally you only give 3 warnings to a team. After which only 2-minute suspensions, disqualifications and exclusions are given. You don't give both advantage and a free throw either. Typically a shot at goal from 9m in which the arm gets hit while shooting, and which misses, deserves a free throw.
Free throws are more about the right to play the ball without interference.
The punishments are more to do with brutality and player behavior. Conclusion Its pretty hard to explain these things in summary - you have to train hard to be a good ref. It takes awhile to learn what applies when and where because the situations can be quite complex. Its also hard to see how a high level match arises from this summary of the rules. Basically you have to see it.