There are a few ways to locate a car radio code, but here are the main ones, in descending order of complexity and cost.
In some cases, you might find the car radio code in the owner's manual. This isn't an especially secure place for it, given that most people keep their manuals in their vehicles, but some manuals have a space for it. If you bought your car used, the previous owner might have entered it there.
Check the sites of your automaker and the stereo manufacturer. Companies sometimes keep online databases of car radio codes. Entering info such as your vehicle identification number (VIN) or the radio's serial number might return the code you're looking for.
Comment