Why does it hurt to take my tampon out? HELP!!

I just started using tampons so you can say I’m a beginner. It’s my 3rd time using a tampon and when I take it out it hurts bad! I only leave in in for like 2 hours because I’m scared I’m going to take it out to late. Anyone know what I’m doing wrong? help plz!!