This is the definition of $|A| <= |B| $:
there exists an injective function from $A$ into $B$.
Why it is defined that way and not like the following proposal, which is equivalent under the assumption of the axiom of choice:
there exists a surjective function from $B$ into $A$.