The free Lie algebra functor is the left adjoint functor $FreeLieAlg$ to the forgetful functor $LieAlg\to Set$. The proof that a left adjoint exists relies on a concrete construction. Let $X$ be a set, then define recursively for $n\geq 1$ sets $X_n = \coprod_{p=1}^{n-1} X_p\times X_{n-p}$ with the basis of recursion $X_1 = X$. If $x\in X_p$ and $y\in X_q$ then denote $x.y$ the element $(x,y)\in X_{p+q}$; this defines a binary operation on $\prod_{n=0}^\infty X_n$, which is therefore the free magma on the set $X$. Let $k$ be the ground ring (commutative and unital). As a $k$-module define $Lib_k(X) = k[\prod_{n=0}^\infty X_n]$, the free $k$-module with basis $\prod_{n=0}^\infty X_n$. It is a nonassociative $k$-algebra with product $(\sum_i a_i x_i).(\sum_j b_j y_j) = \sum_{i,j} a_i b_j (x_i.y_j)$ where both sums are finite and $a_i, b_j\in k$, $x_i,y_i\in X_i$. Define a two-sided ideal $I$ in this nonassociative $k$-algebra, generated by all elements of $Lib_k(X)$ of the form $a.a$ and all elements of the form $a.(b.c)+b.(c.a)+c.(a.b)$, where $a,b,c\in Lib_k(X)$. Then $FreeLieAlg(X) = Lib_k(X)/I$.
The free Lie algebra on the set $X$ is the result $FreeLieAlg(X)$ of evaluating the free Lie algebra functor on object $X$.
The subject of free Lie algebras is combinatorially rich with lots of open problems. By a 1953 theorem of A. I. Širšov (Shirshov) every Lie subalgebra of a free Lie subalgebra is free (an analogue of the Nielsen-Schreier theorem in combinatorial group theory). The study of bases of a free Lie algebra considered as a vector space is very nontrivial; special attention has been paid to so-called Hall bases.
N. Bourbaki, Lie groups and Lie algebras, Chap. II: Free Lie Algebras
Christophe Reutenauer, Free Lie algebras, Oxford Univeristy Press 1993
C. Reutanauer, Free Lie algebras, Handbook of Algebra, vol. 3, 2003, 887-903, doi
C. Reutanauer, Applications of a noncommutative jacobian matrix, Journal of Pure and Applied Algebra 77, n. 2, 1992, p. 169-181, doi
wikipedia: free Lie algebra
Mikhail Kapranov, Free Lie algebroids and space of paths, math,DG/0702584
sbseminar blog: Tannakian construction of the fundamental group and Kapranov’s fundamental Lie algebra
Nantel Bergeron, Muriel Livernet, A combinatorial basis for the free Lie algebra of the labelled rooted trees, Journal of Lie Theory 20 (2010) 3–15, pdf
Leila Schneps, On the Poisson bracket on the free Lie algebra in two generators, pdf
A. Murua, The Hopf algebra of rooted trees, free Lie algebras, and Lie series, pdf
F. Chapoton, Free pre-Lie algebras are free as Lie algebras, math.RA/0704.2153, Bulletin Canadien de Mathe’matiques