Cognitive psychology distinguishes two fundamentally different strategies people use to solve problems. An algorithm is a step-by-step procedure that, if followed correctly all the way through, is guaranteed to reach a correct solution. A heuristic is a mental shortcut or rule of thumb that usually gets a person close to a good solution considerably faster than an algorithm would, but with no actual guarantee of finding the correct or optimal answer every time.
An algorithm trades speed for a guaranteed correct outcome
An algorithmic approach to a problem works through every relevant possibility or step in a defined, systematic order, which is exactly what guarantees it will eventually reach a correct solution if one exists and the procedure is followed all the way through. This guarantee comes at a real cost, though: algorithmic problem-solving can be extremely slow or resource-intensive for problems with a large number of possible options to work through systematically, an unlocking a combination lock by trying every single combination in sequence being a classic, if extreme, example of an algorithm that's guaranteed to work but potentially very slow in practice.
A heuristic trades the guarantee for a shortcut that usually pays off
A heuristic instead relies on a simplified rule of thumb, built from past experience or general pattern recognition, to jump much more quickly toward a solution that's very often good, without systematically working through every possible option the way an algorithm does. This considerable speed advantage comes with a real trade-off: because a heuristic doesn't guarantee correctness the way an algorithm does, it can occasionally lead a person toward an outcome that's wrong or clearly suboptimal, particularly in situations that happen to violate the specific pattern the heuristic was originally built around. People rely heavily on heuristics precisely because most everyday problems don't actually require, or allow time for, a fully guaranteed algorithmic solution.
What we're still unsure about
The basic algorithm-versus-heuristic distinction, and the fundamental speed-versus-guarantee trade-off between them, are well established, foundational cognitive psychology and computer science concepts. What's more genuinely an active area of ongoing research is understanding exactly how, and how consciously, people actually decide which strategy to reach for in a given real situation, since this choice often seems to happen quickly and largely outside deliberate awareness rather than through explicit reasoning about the trade-off — researchers continue studying the specific factors, time pressure, problem familiarity, perceived stakes, that shift a person toward one strategy or the other, without a complete, fully predictive model of that underlying selection process yet.
This sits inside Problem Solving & Decision Making, one of seven topics in Cognitive Psychology, one of four domains in Psychology, one of seventeen subjects the app can quiz you on.