Need a bit of help!

Options
Hi guys!
Bit new to actually having a proper diet. Been dieting for 3 weeks now, just cut down to 1300 cals per day and managed to lose 5lbs without properly exercising.
Joining a gym this week and just need a bit of help regarding diet and exercise.
If I burned 500 cals at the gym, do I eat an extra 500 cals that day or...?
I've never done all this before so just a little bit confused and would appreciate the help!
Cheers!