A theoretical investigation has been carried out for exploring different features of ion-acoustic solitary and shock waves in a three-component magnetized plasma containing a mixture of thermal and nonthermal (energetic) inertialess electrons, warm inertial ions, and positively charged stationary dust particles. The standard Korteweg-de Vries (Burgers) equation has been derived by employing the reductive perturbation method, and its solitary (shock) wave solution has been derived and examined analytically as well as numerically. The latter exhibits characteristic properties (amplitude, width, speed, and polarity) of the ion-acoustic solitary and shock waves. It has been shown that the ion-acoustic solitary and shock waves are significantly modified by different plasma parameters (viz. parameter measuring the ratio of dust charge density to ion charge density, parameter measuring the fraction of energetic electrons, parameter measuring ion or electron temperature, and the external magnetic field). The present investigation may help in understanding the physics of various nonlinear phenomena formed in many space plasma systems, (viz. earth's mesosphere, solar wind, and cometary tails) and laboratory devices (laboratory experiments