An algebraic approach to conformal field theory