We study the quantum dynamics resulting from preparing a one-dimensional quantum system in the ground state of initially two decoupled parts which are then joined together (local quench). Specifically we focus on the transverse-field Ising chain and compute the time dependence of the magnetization profile, ml(t), and correlation functions at the critical point, in the ferromagnetically ordered phase and in the paramagnetic phase. At the critical point we find finite-size scaling forms for the non-equilibrium magnetization and compare predictions of conformal field theory with our numerical results. In the ferromagnetic phase the magnetization profiles are well matched by predictions from a quasi-classical calculation that we describe. © 2011 IOP Publishing Ltd and SISSA.