The NEMO-3 experiment measured the half-life of the $2 ubetabeta$ decay and searched for the $0 ubetabeta$ decay of $^{116}$Cd. Using $410$ g of $^{116}$Cd installed in the detector with an exposure of $5.26$ y, ($4968pm74$) events corresponding to the $2 ubetabeta$ decay of $^{116}$Cd to the ground state of $^{116}$Sn have been observed with a signal to background ratio of about $12$. The half-life of the $2 ubetabeta$ decay has been measured to be $ T_{1/2}^{2 u}=[2.74pm0.04mbox{(stat.)}pm0.18mbox{(syst.)}]times10^{19}$ y. No events have been observed above the expected background while searching for $0 ubetabeta$ decay. The corresponding limit on the half-life is determined to be $T_{1/2}^{0 u} ge 1.0 times 10^{23}$ y at the $90$ % C.L. which corresponds to an upper limit on the effective Majorana neutrino mass of $langle m_{ u} rangle le 1.4-2.5$ eV depending on the nuclear matrix elements considered. Limits on other mechanisms generating $0 ubetabeta$ decay such as the exchange of R-parity violating supersymmetric particles, right-handed currents and majoron emission are also obtained.