It depends on the continuity.
In general, when two Pokemon battle, it's depicted as friendly competition: a sport, for fun. They aren't actually trying to kill each other, and I would imagine they're holding back to avoid doing so. The out-of-universe reason for Pokemon fainting in battle, rather than dying, is that the series' creator didn't want it to be too violent.
In the games, there are reference to Pokemon having died - many of the main-series games feature graveyards, not to mention the ghost of Marowak in Lavender Tower - but none are depicted actually dying. There is a fan theory that one of your battles against Blue in RGB/FRLG results in the death of his Raticate - the next time you see him, he's in Lavender Tower, and Raticate isn't in his party - but that's only a theory, not canon.
In the anime, it's shown that Pokemon can fight to the death, just not in trainer battles. As well as the examples @tobiasvl mentioned, I'd like to highlight the famous "Clones v Originals" battle in Pokemon: The First Movie. It's made clear that not only are they actively trying to kill each other (or at least, the clones are trying to kill the originals), but that Pokemon do not usually fight like that. The only reason none of them die is because Ash sacrifices himself to stop the fight.
I'm not an expert on the various manga, but as I recall, Pokemon can and do die in battle in them. Certainly they suffer severe physical injuries, such as one of Koga's Arbok getting sliced clean in two (it recovered though - thanks to OP for correcting me on that). It's still, as far as I'm aware, a very rare occurence.