The 4th edition of D&D by Wizards of the Coast abandoned the Open Game License (OGL), which essentially locked many third party publishers out of publishing material for it. So that it (and other third parties) could continue publishing D&D content, longtime Dungeon and Dragon and Polyhedron magazine publisher Paizo released their own setting, and basically republished the 3rd Edition (actually 3.5) rules under the brand Pathfinder.
For the first time, the publisher of the D&D brand was not the primary or best selling vendor of D&D. 4th edition was not hugely popular, and Pathfinder had the advantage of third party support thanks to its open license.
Wizards of the Coast quickly returned to the Open Game License with 5e and, anecdotally, the brand is back where it's "meant" to be. And yet Pathfinder persists! And they're both the same game. They are both D&D, they're just different editions (ignore the fact that one grew up to be called "Pathfinder".)
So which one should you play? Which one's the right one for you?
I've played a lot of Pathfinder, and a lot of 5e (and yet not near enough of either, for my tastes.) I've read lots of Pathfinder books, and lots of 5e books. Here are the difference I see between the two games, as objectively as possible.
I wrote this post months ago, back when there was still the illusion that Wizards of the Coast had earnestly committed 5e to an open license. Between writing and posting the article, however, Wizards of the Coast has lost the trust of its the RPG community by threatening to illegally revoke the Open Game License.
For now, Wizards of the Coast has gone back on its threat and committed the rules of D&D to Creative Commons, but you don't build trust by granting a reprieve to a threat you invented (that's called emotional abuse). I no longer recommend D&D Fifth Edition or otherwise. The apparent successor of 5e is Tales of the Valiant by venerable publisher Kobold Press.
I discuss 5e in this post because that's the content and rules I have to compare. As Tales of the Valiant continues to develop, it's sure to differentiate itself from 5e in some specific ways, but I think the comparison will hold true, at least in a broad sense. For that reason, this post discusses 5e historically, and refers to Tales of the Valiant for the future.
When talking about Pathfinder, you're actually talking about three different phases of publication: D&D 3rd Edition (2000), D&D revised 3rd Edition (2003), and Pathfinder (2009). When Pathfinder was first released, it already had a 9 year history. If you bought Pathfinder 1st Edition, you already had 9 years of adventures and supplements from Wizards of the Coast as well as a host of third party publishers who'd been leveraging the Open Game License. You also had as many years of "bonus" content published across Dungeon and Dragon magazines.
If you play Pathfinder 1st Edition today, you have 20 years of content to draw upon. Whether this is empowering or overwhelming depends on your perspective.
5e inherits a lot of lore from its own history, but in terms of drop-in or near drop-in content, 5e starts with 5e. Functionally, that probably doesn't mean anything for your game experience. Everything you need for a 5e game exists, but you may not have everything you want. For instance, I seem to get a lot of players who want to play a witch in D&D but 5e has no Witch character class. Of course Pathfinder does.
In practice, though, the absence of a Witch class doesn't affect my D&D game. I can help players build a Warlock or Sorcerer, call it a "Witch", pick some appropriately witch-like spells, and the player's happy.
Conclusion: Almost no difference.
With Pathfinder, you're likely to find whatever you need in some publication. You'll be able to use it with little to no adjustment. It's drop-in content.
With 5e, you may have to spend time converting or customizing content to fit into your game. Or you can choose to fall back on third party publishers, one of whom has probably already come up with a way for you to have what you want.
Third party publishers targeted Pathfinder for almost a decade. There's an embarrassment of riches when you're looking for 3rd edition content. You'll find settings, mechanics, and adventures.
With the release of 5e, dmsguild.com established a "fan license" that allowed third parties to use D&D trademarks in works being sold on dmsguild.com. This means that third party publishers can release adventures with Beholders and Illithids, set in the Forgotten Realms or Krynn or Athos, and any other classic D&D property. In a way, this jumpstarted 5e's available options, and it seems now that everything's targeting 5e over Pathfinder now.
Conclusion: Pathfinder got all the third party support for several years, so there's a huge back catalogue of third party content. Now that Pathfinder 2 exists, I think there's noticeably less third part support, but then again Paizo is kind of its own third party. They publish so much content that you're not likely to care whether there are other publishers contributing to the material.
Today, 5e is getting the bulk of the third party support. There's plenty of extra content for it.
Its rich history notwithstanding, Pathfinder has lots of options by design. Pathfinder appears to maintain the philosophy that you can't have too many options. Whether it's rule systems or character options, Paizo provides you with everything you could ever want, and leaves it up to you to decide what actually gets used.
5e is reserved. At the time of writing, they've held available classes to the 12 that were first published in its Player Handbook (PHB), with the exception of exactly one additional class (the artificer). They've published a few different settings (Ravnica, Wildmount, Theros, Strixhaven, for example) but these settings haven't been supported with extra content. They've published supplements to PHB (Xanathar, Tasha, and others) but they haven't introduced many new mechanics.
Conclusion: Pathfinder publishes a lot and lets you decide whether you want to use it.
5e publishes a little, and also lets you decide whether you want to use it.
Pathfinder's setting is the world of Golarion, and in a way it's a catch-all. When there's a call for a new "setting", it seems that there's a region on Golarion that happens to be exactly that. On Golarion, most cities are traditional "generic" fantasy, but there's a region for gothic horror, there's a region where you'll find pirates, a region for touches of sci fi, steampunk, Arabian-style deserts, jungles, and so on.
There are also source books for visiting other dimensions (or "plane" of existence), interplanetary travel, and of course there are third party books for true alternate settings (such as the excellent Midgard by Kobold Press and Lost Lands by Frog God). There's also a separate game entirely, called Starfinder, set in the far future of the Pathfinder solar system.
In general, you can think of Golarion as a single setting with a high degree of variety.
5e is set on Toril. It's a rich fantasy world that's been well defined in novels that started in the 90s. There are many different regions, but for the most part it's pretty coherent. The timeline for the planet is carefully managed, technology is pretty consistent, and the cities very much feel like they've all developed mostly at the same pace. When players want to break from the trajectory of Toril's history, they can board a spelljammer (a ship, powered by magic, capable of travel on the Astral Sea) and visit a different setting, such as Ravnica, Theros, Wildemount, and so on.
Conclusion: Settings are malleable, and both Pathfinder and 5e have a variety of locations with lots of lore you can use in your game. The more you have to draw from, the better.
The math in 5e is slow and steady. You get small upgrades to your stats and proficiency bonus over the course of the game. A few of your attribute modifiers can increase by 1 every 8 levels, and you get an extra point of proficiency bonus every 4 levels. You mark proficiency for a few skills at character creation, and you don't really think about it ever again.
Your typical maths during a game session are adding an attribute and proficiency bonus to an attack roll, adding a proficiency to a skill check, and adding up the results of damage.
The math in Pathfinder is constant and powerful. In 1e, you get boosts to class skills at character creation (in 2e you get proficiency.) In both editions, you get skill points each time you level up so you can buy skill ranks to improve your rolls.
The result tends to be greater precision in Pathfinder. I don't have the research to prove it, but it's safe to say that when you build a Pathfinder character to be good at a specific set of skills, that's probably going to be reflected in game play. This specialization is satisfying as a character builder, although it can be dangerous when a party isn't well-rounded (although as always, a good Game Master can often solve that problem with carefully selected magical items.)
In 5e, you're more likely to be generally good at a cluster of skills, with a few peaks here and there. The system relies on roleplay for you to accentuate your character concept, and on a proficiency bonus to create a few exceptional skills for each character.
Conclusion: You see bigger numbers in Pathfinder, while the range of numbers in 5e remains constrained and steady. Pathfinder arguably achieves a better reflection of characters through mechanics than 5e, while 5e favours low maintenance, expressing just what's necessary for the game to function while leaving the details up to imagination.
The frequent and purportless definition between Pathfinder and 5e is "Pathfinder is complex, 5e is simple." I disagree with this because I find that Pathfinder is only complex if you try to learn everything about it all at once, or if you choose to incorporate optional rules. Truth be told, 5e is complex if you try to learn it all at once, or if you choose to incorporate optional rules.
There is truth, however, to the idea that Pathfinder attempts to be more exact, while 5e is content with generality.
For instance, look at the trip mechanic. In both Pathfinder and 5e, it counts as an attack. However, in Pathfinder it also provokes an attack of opportunity because it's assumed that concentrating on playing footsie with your enemy opens you up to a potential smack in the face.
That's the major difference, and actually reflects each system pretty accurately. However, it doesn't exactly stop there. Because there's risk involved with the Pathfinder trip, there's also a way to mitigate that risk. You can take the Improved Trip feat to negate the risk of an opportunity attack.
Should you fail your trip attack by 10 or more in Pathfinder, you yourself are knocked prone. The more legs a creature has, the better its defense against your trip, and the stronger and more dextrous your target, the harder it is to trip. Oozes, creatures without legs, and creatures in flight cannot be tripped.
In 5e, by contrast, you make a Strength (Athletics) check against your target's Strength (Athletics) or Dexterity (Acrobatics). Your target gets to choose which ability to use as defense.
Can you trip an ooze in 5e? It doesn't say you can't. Except that the result of a successful trip attack (it's actually called a shove attack, but it's used for both tripping and shoving) is the prone condition. Oozes are immune to the prone condition, so while you can make a shove attack against an ooze, you would be wasting that action by choosing to knock it prone.
So the difference between Pathfinder and 5e, in the arbitrary example of tripping, is that only in Pathfinder are you subject to an opportunity attack or accidentally tripping yourself.
I haven't gone through the rulebooks and compared literally every rule, but my feeling is that similar conclusions would be made about many of them. The way you get to the same conclusion differs, and the exceptions and risks are presented to you at different times, but in the end it averages out to be roughly the same.
Conclusion: A minor footnote at the end of an action can lead to a whole new set of options for the player or Game Master. Pathfinder makes those little footnotes, which potentially lead to new possibilities, as a way to further the game in the mechanical sense. You're hit by an attack of opportunity as you try to trip a monster, and then you fail your check by 10. You're prone and down by 10 more hit points than you'd anticipated, and you're lying at the feet of a vicious monster. You have new problems to face, and hopefully a few last minute actions to take.
5e typically ends mechanics as soon as possible, allowing the players and the Dungeon Master to further the game through, probably, roleplay. When you fail to trip a creature, you get to try a new tactic. You're not punished for it, the game state hasn't shifted because of it, but you've got the opportunity to create new challenges.
You should play both Pathfinder and Tales of the Valiant. Honestly.
I want to emphasize more than anything that the two systems are essentially the same game. They arrive at the same goal by different routes, and there's obviously enough of a significant difference that they co-exist. People can have a preference for one over the another.
I guess if I had to choose just one system to keep, I could probably make a choice between the two, but ultimately, branding aside, they're both D&D and they both feel like it. If you've read this post, you probably have some idea of the difference between them now, but to decide which you prefer, you should play both. Thanks to the Open Game License, both rulesets are available online for free, and there are lots of games happening at game stores and online. Dive in, try them out, and choose one. Or both.