It means don't play with matches,... When my mum used to leave us on our own at home, she had a whole list of things like Don't answer the front door, don't switch on the cooker, don't play with matches...of course we did but she never found out (soory mum)
yeah... if you are going to do something which is potentially dangerous, don't be surprised if you get hurt.
eg if you get involved with a married man, you shouldn't be surprised if he runs off with another woman and you end up crying into your tea...
"if you're gonna play with matches, you're gonna get burned"