If you did not buy your phone through TracFone, it is likely unlocked already, and no code is needed.
TracFone’s unlock policy is available here.
Different phones require different methods for removing and replacing a SIM card. Learn to Switch SIM Cards on your phone.