How to obtain symmetry algebra? By making an infinitesimal coordinate transformation $x^\mu$ --> $x^\mu + \epsilon^\mu$ corresponding to a symmetry of a given theory, one can obtain the Killing equation and hence obtain the Killing vector $\epsilon = \epsilon^\mu\partial_\mu$. For example, for conformal symmetry group the Killing vectors are

\begin{align} & m_{\mu\nu} \equiv i(x_\mu\partial_\nu-x_\nu\partial_\mu) \,, \\
&p_\mu \equiv-i\partial_\mu \,, \\
&d \equiv-ix_\mu\partial^\mu \,, \\
&k_\mu \equiv i(x^2\partial_\mu-2x_\mu x_\nu\partial^\nu) \,. \end{align}

Now, each symmetry transformation leads to a conserved charge and they satisfy an algebra. For the conformal group, the algebra of conserved charges are

\begin{align} &[D,K_\mu]=-iK_\mu \,, \\
&[D,P_\mu]=iP_\mu \,, \\
&[K_\mu,P_\nu]=2i\eta_{\mu\nu}D-2iM_{\mu\nu} \,, \\
&[K_\mu, M_{\nu\rho}] = i ( \eta_{\mu\nu} K_{\rho} - \eta_{\mu \rho} K_\nu ) \,, \\
&[P_\rho,M_{\mu\nu}] = i(\eta_{\rho\mu}P_\nu - \eta_{\rho\nu}P_\mu) \,, \\
&[M_{\mu\nu},M_{\rho\sigma}] = i (\eta_{\nu\rho}M_{\mu\sigma} + \eta_{\mu\sigma}M_{\nu\rho} - \eta_{\mu\rho}M_{\nu\sigma} - \eta_{\nu\sigma}M_{\mu\rho})\,, \end{align}

To obtain the above algebra, one can just consider the Killing vectors as charges and find the commutator relations. But, I know that this method does not work always since for example in 2D CFT, the algebra of Killing vectors is the Witt algebra, while the charges satisfy Virasoro algebra and the latter differs from the former by a central extension.
So my question is, when does the method of finding the algebra of charges by just taking the commutator of Killing vector fail? 
 A: Well, the point is that the Killing symmetries only concern the geometry. Instead the charges refer to the peculiar (classical or quantum) physical system you are considering, which contains much more information also and especially of 
non-geometrical nature. Already in classical Hamiltonian formulation there is room for central charges when you represent the Lie algebra of Killing symmetries using the Lie parenthesis $[\cdot, \cdot]_L$ in terms of a Lie algebra of Hamiltonian charges with Lie parenthesis given by the Poisson bracket $\{\cdot, \cdot\}$. 
On the one hand you have physical charges $Q$ obtained by a specific (Hamiltonian) theory, on the other hand you have fixed geometric Killing fields $X$, independent form the physical system because in common with all physical systems.
What the theory says is that
(a)  there exists a linear map $Q \to X_Q$, satisfying $$[X_Q,X_{Q'}]_L= X_{\{Q,Q'\}}\:.\tag{1}$$
However, 
(b) the map is not injective, since 
 $$X_Q = X_{Q+c}\tag{2}$$
 for every constant $c$. 
If $X_{Q_k}$, $k=1,\ldots, n$ is a basis of the Lie algebra of Killing symmetries,
$$[X_{Q_i},X_{Q_j}]_L = C_{ij}^k X_{Q_k}= X_{C_{ij}^kQ_k}$$
where I used the convention of summation  over repeated indices.
Comparing with (1)
$$X_{C_{ij}^kQ_k - \{Q_i,Q_j\}}=0$$
However (2) implies that there may be antisymmetric constants $c_{ij}$, the famous central charges such that
$$C_{ij}^kQ_k - \{Q_i,Q_j\} = -c_{ij}$$
and thus
$$ \{Q_i,Q_j\} = C_{ij}^kQ_k + c_{ij}$$
If the Lie algebra satisfies some co-homological condition, it is possible to redefine the charges by added constants,
$$Q_{k} \to Q_k' = Q_k + f_k$$ in order that 
on the one hand the associated Killing fields remain fixed, on the other hand
$$ \{Q'_i,Q'_j\} = C_{ij}^kQ'_k$$
(It suffices that $C_{ij}^k f_k= c_{ij}$).
The picture at quantum level is essentially identical, just replacing the charges with at least (anti)symmetric operators defined on a common dense domain and the Poisson parenthesis is replaced for the commutator of operators (there are many subtleties here when trying to lift the representation of the algebra to a unitary representation of the symmetry group, but I do not insist on these now). Again central charges may appear because the quantization concerns the Hamiltonian charges and not the Lie group of Killing isometries. 
Usually central charges carry some physical information the geometry cannot encompass because it cannot distinguish among the various physical systems living on the same background. The typical example is the mass of the system with respect to the Galileian symmetry.
One of the one-parameter subgroups of the Galileo Lie group is the boost which changes the velocities of every part of the system by adding a common velocity. However, in Hamiltonian/quantum formulation, the variables are positions and momentum and the momentum is related with the velocity by means of the mass $m$. This is different for different systems and it is not selected by the geometry. The spot where this non-geometrical information takes place is just a central charge.
$$\{K_i,P_j\}= m\delta_{ij}\:,$$
$K_i$ being the generator of the boost transformation along the $i$-th axis,  to be compared with the geometric corresponding
$$[X_{K_i},X_{P_j}]_L= 0\:.$$
The quantum version is affected by the same central charge whose nature is however clear.
