For a vector field, $X^\mu{}_{;\nu} = \partial_\nu X^\mu + \Gamma^\mu{}_{\kappa\nu}X^\kappa.$
Because the covariant derivative should coincide with partial derivatives on scalars, and should satisfy the Leibniz rule, $$\nabla_\mu (X^\nu X_\nu) = (\nabla_\mu X^\nu) X_\nu + X^\nu (\nabla_\mu X_\nu) = \partial_\mu (X^\nu X_\nu) = (\partial_\mu X^\nu) X_\nu + X^\nu (\partial_\mu X_\nu)$$
we can conclude that for 1-forms, $$X_{\mu;\nu} = \partial_\nu X_\mu - \Gamma^{\kappa}{}_{\mu\nu}X_\kappa.$$
Now, because the covariant derivative should satisfy the Leibniz rule, for a simple tensor $X^\mu Y^\nu$, $$\nabla_\rho (X^\mu Y^\nu) = (\nabla_\rho X^\mu) Y^\nu + X^\mu (\nabla_\rho Y^\nu) = (\partial_\rho X^\mu) Y^\nu + X^\mu (\partial_\rho Y^\nu) +
\Gamma^{\mu}{}_{\kappa\rho}X^\kappa Y^\nu
+ \Gamma^{\nu}{}_{\kappa\rho}X^\mu \ Y^\kappa $$
$$ = \partial_\rho (X^\mu Y^\nu) + (\Gamma^{\mu}{}_{\kappa\rho}\delta^\nu_\lambda + \delta^\mu_\kappa\Gamma^\nu{}_{\lambda\rho} )X^\kappa Y^\lambda.
$$
Because any tensor is a linear combination of simple tensors, it holds for arbitrary (2,0)-tensors that $$\nabla_\rho T^{\mu\nu} = \partial_\rho T^{\mu\nu} + (\Gamma^{\mu}{}_{\kappa\rho}\delta^\nu_\lambda + \delta^\mu_\kappa\Gamma^\nu{}_{\lambda\rho} )T^{\kappa\lambda} = \partial_\rho T^{\mu\nu} + \Gamma^\mu{}_{\kappa\rho} T^{\kappa \nu} + \Gamma^\nu{}_{\kappa\rho}T^{\mu\kappa}. \tag 1$$
The generalization to tensors of arbitrary type is now clear, and can be summarized in the following rule:
For every up index, add a Christoffel symbol contracted with the tensor on that index. For every down index, subtract such a term instead.
Now, when taking second covariant derivatives, it has to be remembered that the Christoffel symbols are not constants, so one has to take derivatives of them, also. And, the first covarian derivative adds an index, so for the second step, we need to use the formulas for tensors of the appropriate type.
E.g., for a vector, $X^{\mu}{}_{;\nu}$ is a $(1,1)$-tensor, so
$$X^\mu{}_{;\nu\rho} = \nabla_\rho(\partial_\nu X^\mu + \Gamma^\mu{}_{\kappa\nu}X^\kappa).$$
Now, in the operand, neither term is tensorial on its own -- remember: partial derivatives and the Christoffel symbols are not tensors Thus, $\nabla_\rho \partial_\rho X^\mu$ doesn't strictly make sense -- the covariant derivative can only act on tensors. But we can proceed formally using the appropriate version of (1) for each term, and adding them up, we do get the a tensor. Anyway, that gives something like
$$X^\mu{}_{;\nu\rho} =
\partial_\rho \partial_\nu X^\mu +
\Gamma^\mu{}_{\kappa\nu,\rho}X^\kappa +
\Gamma^\mu{}_{\kappa\nu}\partial_\rho X^\kappa +
\Gamma^\mu{}_{\kappa\rho}(\partial_\nu X^\kappa +
\Gamma^\kappa{}_{\lambda\nu}X^\lambda)
- \Gamma^{\kappa}{}_{\nu\rho}(\partial^\kappa X^\mu
+ \Gamma^{\mu\lambda}X^\lambda). $$
It is simple but extremely tedious and involves an awful profusion of indices to extend the calculation to the second covariant derivative of a $(2,0)$-tensor.