I must admit that I've been reporting this for years, but I really want to lose about 20 pounds...

I have a treadmill at home, but I'm not really sure how to use it to lose as much weight as possible.
(Like how long each session? Do I need to do walking/running intervals? How many times a week for a beginner?)

What else should I be doing (preferably at home) that can help me lose weight?

I also need advices to keep myself motivated. I do want to lose weight. I do want to find myself pretty and sexy. But after 24-48 hours, I always get back to the "whatever, I look good anyway and I like eating pastas" way of thinking. Any tips to keep focussed and not want to go back to old habits? (I don't eat any junk food/chips/dessert, but I just can't stop myself eating pastas/bread/and such)

Any help is appreciated!