No. There is no law that makes it a crime for a minor to play a violent game. Age ratings exist as guidance for parents and retailers, not as criminal statute.
What can happen is a refusal at the counter. In many countries, shops voluntarily decline to sell 18-rated or M-rated titles to anyone under that age, and a clerk may ask for identification. A parent buying the game for their child is a different matter and is generally allowed.
The practical takeaway: the restriction is commercial and advisory. Whether a particular child should be playing a particular game is a decision for the family, based on the rating and the child's temperament.