Isocyanic acid (HNCO), the most stable of the simplest molecules containing the four main elements essential for organic chemistry, has been observed in several astrophysical environments such as molecular clouds, star-forming regions, external galaxies and comets. In this work, we model HNCO spectral line profiles toward the low-mass solar type protostar IRAS 16293$-2$422 observed with the ALMA interferometer, the IRAM, JCMT and APEX single-dish radio telescopes, and the HIFI instrument on board the Herschel Space Observatory. In star-forming environments, the HNCO emission is not always in Local Thermodynamical Equilibrium (LTE). A non-LTE radiative transfer approach is necessary to properly interpret the line profiles, and accurate collisional rate coefficients are needed. Here, we used the RADEX package with a completely new set of collisional quenching rates between HNCO and both ortho-H$_2$ and para-H$_2$ obtained from quantum chemical calculations yielding a novel potential energy surface in the rigid rotor approximation. We find that the lines profiles toward IRAS 16293$-$2422 are very well reproduced if we assume that the HNCO emission arises from a compact, dense and hot physical component associated with the hot corino, a warm component associated with the internal part of the protostellar envelope, and a cold and more extended component associated with the outer envelope. The derived HNCO abundances from our model agree well with those computed with the Nautilus chemical code.