This is mostly an opinion based question, but I'll say what I think happens to Pokemon. When Pokémon are defeated in battle, they 'faint'. You then take them to the Pokemon Center, where they are healed back to 'perfect health'. However, there are a few things that prove that Pokémon can die (imo).
In Lavender Town, there is a tall building, where 'the spirits of departed Pokemon rest'. Essentially it is where dead Pokémon are buried. By speaking to the many characters in this tower, you can find proof that Pokemon do die. For example, if you speak to a blonde girl she will say, "Oh my poor Pokémon, why did you have to die?" Or something along those lines.
There is a theory regarding your Rival Gary's Raticate, however it is a theory and therefore may not be true.
At the beginning of Pokemon Red, Blue, Green, FR, and LG, you are introduced to your Rival, Gary. As your rival, he proceeds to battle you multiple times in the game. In Gary's team there is a Rattata, which later evolves into Raticate. However, when you reach Lavender Town, and go to the Tower, you find Gary standin at one of the gravestones. He then proceeds to battle you, but this time Raticate is not on his team. The theory implies that YOU killed his Raticate, and that when Gary got to the Pokemon Center it was too late. His Raticate had died.
Giratina and the Sky Warrior
This is just one example of Pokémon 'dying' in the anime/ films. In one scene from Giratina and the Sky Warrior, Giratina appears to be dying. However, it gets revived by Shaymin's Aromatherapy.