There are various ways to do this, but one of the most flexible ways is to use a secret sharing scheme. These are mathematical methods that allow a secret value (such as a symmetric encryption key, or even an entire file) to be split into multiple "shares", such that a certain number of shares (which does not necessarily need to be all of them) is required to reconstruct it.
For example, a simple $n$-out-of-$n$ secret sharing scheme like you describe can be obtained by taking $n-1$ random bitstrings (from a cryptographically secure true RNG) of the same length as the secret, and constructing the $n$-th share by bitwise XORing together all $n-1$ other shares and the secret. It's not hard to prove that this last share is then also indistinguishable from random, and in fact that knowing no set of $n-1$ or fewer shares yield any information about the secret (other than its length, that is). But if you have all $n$ shares, you can just XOR them together to get the original secret value back.
Once you've split the secret into $n$ shares, you can of course then e.g. encrypt each share with a different person's key. Or you could just directly send each share to the person it belongs to for safekeeping, if that's more practical.
The real power of secret sharing schemes, however, is that you don't necessarily have to require all shareholders to cooperate in order to reconstruct the secret. Specifically, there exist efficient threshold secret sharing schemes, such as Shamir's scheme, which work basically just like the simple XOR scheme described above, but allow the secret to be reconstructed from any subset of $k \le n$ shares, where $k$ is an arbitrary threshold set when the shares are created.
The mathematics involved are slightly more complicated than in the basic XOR scheme above, but they provide essentially the same guarantee: any $k$ shares uniquely determine the secret, whereas $k-1$ shares do not reveal any information about it whatsoever (not even if the attacker has infinite computing power!).
For example, to implement a general "two-person rule" for accessing some sensitive data (which could e.g. be a key to something else), you could use Shamir's secret sharing with a threshold of $k = 2$ to split the data into $n$ shares, and distribute these among all authorized persons. That way, any two authorized persons could combine their shares to reconstruct the data. But as far as a single person acting alone is concerned, their share is just a random number that reveals absolutely nothing about the data unless combined with another share.
There are also hierarchical secret sharing schemes that allow more complex access structures, such that one could require e.g. "any two people in group $A$ and any three other people in group $B$" to access the secret. I could go into more detail, but we actually have an entire secret-sharing tag with plenty of good questions and answers that you might want to take a look at.