Bettas can actually live quite a long time (up to 7 or 8 years has been recorded I believe), but a lot of does depend on the conditions they were kept in before you receive it. For example, chain store bettas tend to average a shorter lifespan than bettas that are purchased from a breeder.
A good varied diet helps to keep bettas healthy, they are primarily carnivorous fish so they definitely enjoy live / frozen / freeze dried treats, although some avid betta keepers give them a pea once a week for digestive health.