Baby steps. You build gradually. Once you're comfortable with, say, 10 miles, you try 12. After you're comfortable with 12, you try 15. I doubt that many of us went from doing short rides to long rides overnight. Even after riding for a number of years, I still have to build my mileage gradually each spring once the weather allows for riding again. You'll see a lot of training plans that call for adding 10% each week to your mileage (both to your longest ride and to your overall mileage). That's a decent suggestion, although from my experience, you'll likely encounter certain plateaus that take longer to get past. For me, it took a bit longer to get past the 35-mile and 60-mile marks.

As for hills, it's just going to take time and training. Given that you're an ex smoker (congrats btw) and a new rider, I would try to avoid the worst of the hills for now if you can and, if you can't, don't be ashamed if you have to walk some of them. You need to give your body time to develop a good aerobic base, as well as sufficient leg strength.

A big part of hill climbing is technique, too. There are a number of old threads on the subject of climbing here on TE. I won't attempt to cover that here. Instead, I'd suggest doing some searches on the topic and reading what comes up.