rc5 38khz
The remote can be expected to use RC5 or one of the other less popular protocols. You may want to study the respective internet documents. Apart from the 38 kHz carrier (which could be generated e.g. by a 555), it involves a command sequence coded in the baseband pulses. It's not actually a square wave. Most people use a dedicated remote control chip or a µP (e.g. a PIC) to generate the carrier and the command sequence in one part. But if you're following a very basic approach, you can design the remote controller from CMOS logic IC.