How to Resolve Error: “Invalid SIM” for Iphone 6

My parents gave me an iphone6 for my birthday just last week and it keeps on complaining about the SIM card. The error I was getting says: “Invalid SIM”. My initial solution is to turn it off and turn on again and sometimes it will work but there were few times that it will show the same error after turning it on. Is this problem related to me turning the device off while charging? What could be the causes for this? What else should I do?
