If a pokemon stays in its pokeball, it remains as energy and can basically live forever. That's one way they can live and not die.
If they were outside a pokeball, they would die like any living creature would. This could be due to old age, sickness, hunger, etc.