Considering a two user NOMA system where user 1 is allocated high power and user 2 is allocated less power, successive interference cancellation must be done at user 2. It involves four steps
(i) Directly demodulate the superposition coded received signal to get user 1's data. (Following the modulation scheme used for user 1)
(ii)Multiply the result of step (i) with the square root of user 1's power allocation coefficient.
(iii)Subtract the result of step (ii) from the actual received signal of step(i)
(iv)Demodulate the result of step (iii) following the modulation scheme used for user 2.
You can find more details and a sample MATLAB code here: