vanhees71 said:
This is the completeness relation for a bunch of vectors, usually a complete orthonormalized set of Hilbert-space basis vectors, |i\rangle. These usually occur as eigenvectors of an self-adjoint operator.
To expand on vanhees's statement a bit, when we say "completeness," we are talking about a basis (usually an eigenbasis of a self-adjoint operator) for a particular vector space V. If we have a complete basis for a particular space (in this case, |i\rangle collectively spans the vector space V), then we can express any arbitrary vector v (or function f if we're talking about a function space) as a sum of its components multiplied by the basis vectors. For example, if we're working in \Re^3, we can choose as a basis the standard basis vectors: e_1=(1,0,0), e_2=(0,1,0), and e_3=(0,0,1). In Dirac notation, these would typically be |1\rangle, |2\rangle, |3\rangle.
Now given an arbitrary vector in \Re^3, we can write it as a sum of |1\rangle, |2\rangle, |3\rangle with the proper coefficients in front of each basis vector. For example, the vector u=(2,1,0) can be expanded in the form |u\rangle = \sum_{i=1}^{3} | i \rangle \langle i | u \rangle as | u \rangle = 2 | 1 \rangle + 1 | 2 \rangle + 0 | 3 \rangle.
The term \langle i | u \rangle in the sum is the inner product of the basis vector with the arbitrary vector u. This inner product picks out the component of u in the direction of that particular i basis vector. Now this inner product is just a scalar value. The additional | i \rangle is there because we're attempting to expand a vector as a sum of basis vectors multiplied by their respective components in u for each basis vector. So when you multiply an inner product by a ket, you're just scaling a ket. That's all.
I hope this helps!