Programming a new remote - DirecTV

I had to order a replacement remote because ours broke. Now that the new one has arrived I can't get it to work. What do I need to do in order for it to work with our receiver? Thanks!

This question, "Programming a new remote," is about DirecTV channels, programming, equipment, and sports.