When a semigroup can be embedded into a group Under what assumptions can a semigroup $(S,*)$ be embedded into a group?
 A: It is clear that if a semigroup is embedded into a group, it must be cancellative.
Clifford, Preston: The Algebraic Theory of Semigroups - Page 34. See also A. Nagy: Special classes of semigroups, Theorem 3.10,
p.46

A commutative semigroup can be embedded in a group if and only if it is cancellative. The usual procedure for doing this by means of ordered pairs, is just like that of embedding an integral domain in a field.

This construction is sometimes called group of
quotients. This article at proofwiki is somewhat related to this construction.
For non-commutative semigroups, the situation is more complicated.
Clifford, Preston: The Algebraic Theory of Semigroups - Page
36

A cancellative semigroup $S$ can be embedded in a group of left quotients of $S$ if
  and only if it is right reversible.

This paper might also be of interest: George C. Bush: The embeddability of a semigroup--Conditions common to Mal'cev and Lambek, Trans. Amer. Math. Soc. 157 (1971), 437-448.
EDIT: See also this wikipedia article which contains all the information I've given above and also a few further references. (Perhaps I should have searched wikipedia first, before posting this...)
