How to stick to a diet?

I've gained about 10 pounds and I'm getting really insecure with my body. I'm basically addicted to junk food, like I don't know how to cut it out of my life. And the whole exercise and all that, ill do like 30 minutes of cardio, and then ill do like squats and sit ups and push ups and stretches and things like that, but then I eat a lot after. I say to myself "i burned the calories so I won't gain anything." I don't know how to control myself in a way, does anyone have any tips for me?
How to stick to a diet?
Post Opinion