Here are some tips to keep motivated and working out.
Set goals - having a goal will help you stay on track and committed to getting to where you want to be. It allows you to track your progress towards it and also remind you why you're doing it if you do go off course.
Be in a comfortable environment - you have to be comfortable where you're working out to like it and stick to it. If you hate the gym you go to and aren't comfortable then you won't want to go and you'll not stick on course. Ensure you like the gym you're in and it'll help keep you motivated.
Put your headphones in - music in, world out! Music has been shown to help you workout and achieve better results so get some headphones and find those good tunes.
Photos - track your progress with photos. The scales are a way to measure your weight but it doesn't show the whole picture, take progress pictures and you'll be able to look back to see how far you've come and remind yourself why you're doing it. They give a real life update rather than just numbers on a screen.
Have a partner - it doesn't have to be a training partner you go to the gym with but at least someone you can talk to and show updates to. This will help to keep you motivated and engaged with what you're doing.
Check in with a pro - Occasionally check in with a PT to make sure you're on the right track and doing things as you should be. They will be able to assess you and ensure you're performing to your best. The tips they give you will also give you that extra boost to implement them and keep going.
Supplement - Supplement your training with things like shakes, vitamins, creatine etc to help you get the most from your training.
Be smart - Workout smart, refresh your programme when needed, keep things exciting, do your research and learn lots along the way.