We perform a detailed theoretical-experimental study of the dynamical decoupling (DD) of the nitrogenvacancy (NV) center in diamond. We investigate the DD sequences applied to suppress the dephasing of the electron spin of the NV center induced by the coupling to a spin bath composed of the substitutional nitrogen atoms. The decoupling efficiency of various DD schemes is studied, including both periodic and aperiodic pulse sequences. For ideal control pulses, we find that the DD protocols with the Carr-Purcell-Meiboom-Gill (CPMG) timing of the pulses provides best performance. We show that, as the number of control pulses increases, the decoupling fidelity scaling differs qualitatively from the predictions of the Magnus expansion, and explain the origin of this difference. In particular, more advanced symmetrized or concatenated protocols do not improve the DD performance. Next, we investigate the impact of the systematic instrumental pulse errors in different periodic and aperiodic pulse sequences. The DD protocols with the single-axis control do not preserve all spin components in the presence of the pulse errors, and the two-axis control is needed. We demonstrate that the two-axis control sequence with the CPMG timing is very robust with respect to the pulse errors. The impact of the pulse errors can be diminished further by symmetrizing this protocol. For all protocols studied here, we present a detailed account of the pulse error parameters which make the strongest impact on the DD performance.In conclusion, we give specific recommendations about choosing the decoupling protocol for the system under investigation.