Manufacturers use many different programming codes, but many reuse codes for their remote controls, so programming a remote manually typically requires trying multiple codes that individual manufacturers use. Input these codes using a remote's manual programming feature. These vary among manufacturers, but they often require holding down the Program or Code button.
Once you find out how to manually program the remote, try codes listed in the manual, and make sure to press the right button to set the code after inserting it. Try all of the remote control's functions after setting a code because some codes might cover some buttons and not others.
Another option to consider is to use the automatic programming feature on the remote. While this process varies by manufacturer, it generally involves entering the remote's automatic programming mode and pressing a button until the television responds. This mode uses common codes from a range of manufacturers, so it can take a while to find the code that works for a specific television. After finding the code, press the button to set it. Make sure to try all the functions on the remote control after trying the first code you find through the automatic programming feature because the remote control might need a code that comes up later in the sequence to support all of its functions.