Since you seem to have more of a longterm motivation problem, I'll focus on building a base motivation. The examples I give are diet related, as that's what I'm working on right now. They do apply to training (and all other things) as well, though.
First of all, to make a lasting difference you need a goal to work towards. If you don't have a goal, then why do it anyway? So, before setting your goal you need to know some important rules of goal setting.
Make it measurable:
While "Looking good" and "being healthy" might in effect be your goal, they're weak ones to strive for. There's absolutely no way to know how far off you still are, so you wouldn't know your progress.
A better goal would be "to lose 20lbs". This gives you a concrete goal to strive for, a number that you can measure. Other good goals would be "to be able to bench press 100lbs", "Completely eliminate soda from my diet" etc. Just make sure there's a way to definitely say when you've reached your goals.
Set a deadline:
So "losing 20lbs" is a measurable goal, but it doesn't really hold you accountable. After all, if you reach that goal in 2 months or 6 months is not really an issue. This is why you need a deadline on your goals.
"Losing 20lbs until my vacation" would be a much better goal, as you'll really have to work to achieve that goal until your vacation comes up. This deadline will keep you accountable, which'll make it much less likely that you'll skip a workout.
Split it up:
A great big goal can be very intimidating to reach and the bigger it is the more frustrating the way will be. By splitting goals into smaller sub-goals, you allow yourself to go one step at a time instead of the whole way at once.
Let's stay with "Losing 20lbs until my vacation". By setting milestones you can make sure to be on track and split those intimidating 20lbs into smaller portions. By splitting your goal like this, it will become much easier to keep track and really keep at it.
- lose 5lbs over the next two weeks
- lose 10lbs (total) over the next four weeks
- and so on...
You can also find new sub goals, that aid your bigger goals, even if they're not at first glance a sub-goal. "Only drinking soda on weekends until my vacation", would be one such supporting sub-goal, as would be everything else that aids you in reaching the bigger goals.
Make it realistic:
A good goal has to be reachable, of course. I just mention this for completeness's sake, as I'm sure you wouldn't try to "lose 10lbs by friday".
Don't overdo it:
Try to set your goals so you have a bit of wiggling room. If you have to refuse your grandma's birthday cake to reach your goal, then maybe you set it the pace a bit too steep. You don't want to become a social outcast in the process of reaching goals, so plan accordingly.
By utilizing the above guidelines you should be able to work your way from a big goal to several smaller goals. This can end in a (very very) long list of small steps to take, but don't be intimidated. Done right, every single sub-goal should be relatively easy to reach, giving you a sense of achievement as it's completed. This should keep you motivated, as you've "already achieved so much" after a short while. Also, the next deadline is just around the corner, so you'll be much less likely to skip workouts or fall for the fast food trap.