Quantum gates are generally represented as a matrix. Gates can act on any number of qubits, but the most common act on two or three. However, if you have a system of $n$ qubits and you want to apply a gate that operates on two qubits, how can you simulate this? The problem is that the system state of the processor is represented as a vector of length $2^n$, but our gate matrix is of size $2^k$ where $k$ is the number of qubits the gate acts on.

The standard way of solving this is two use the tensor product with the identity matrix, $I$. If our gate matrix is $O$ and operates on just one qubit, and we want to apply it to the first qubit of our computer, we can create a new matrix by doing

where there are $n-1$ total identity matrices in that sequence.