  Studies of charmonium properties and production mechanism started with the
discovery of $J/\psi$ meson. Since more than 40 years the charmonium production
mechanism is still not entirely understood. Following the era of investigations
at $e^+e^-$ machines, nowadays, charmonium states are copiously produced at
hadron colliders, that allows systematic studies of their resonance parameters,
production observables and decays. Despite large production rates, many
charmonium states are barely studied due to the complications of their
reconstruction against a large background level. The LHCb experiment provides a
unique opportunity to study S-wave and P-wave charmonium states using their
decays to hadrons. This allows measuring production observables of $\eta_c$ and
$\chi_c$ charmonium states. According to the theoretical formalism of
Non-Relativistic QCD (NRQCD), the production observables of the same wave
charmonium states are linked. Hence, the LHCb measurements provide a series of
stringent tests of NRQCD. In the framework of this thesis, the first
measurement of the $\eta_c(1S)$ differential production cross-section at
$\sqrt{s}=13\,TeV$ and the most precise to date single mass measurement are
performed, where the $\eta_c(1S)$ state is reconstructed via its decay to
$p\bar{p}$. In addition, the production of the $\chi_c$ and $\eta_c(2S)$ states
in $b$-hadron decays is studied using decays to $\phi\phi$. The obtained
results are confronted with existing theory predictions. The original
phenomenological analysis concludes that the description of charmonium prompt
production and production in inclusive $b$-hadron decays in an entire range of
transverse momentum remains a challenge.
