There are several different ways to do this depending on the details of what you want to accomplish and your own technical background.
Have you had a chance to look at the IR control FAQ yet? It details five or six different methods and compares and contrasts them.
( The topic title is a clickable link)