Rest in Peace creates what we call a replacement effect. If a card *would* go to the graveyard, it goes to exile *instead.* Relevantly, abilities that trigger when a card is put into a graveyard (e.g. Hangarback Walker, Veteran Explorer, Rancor, Blood Artist) are not going to happen. Most of the rules interactions with Rest in Peace are pretty straightforward, but there are a few oddities.
What happens if I use a removal spell on Rest in Peace? Let’s use Abrupt Decay for this example. Rest in Peace’s replacement effect will apply to the Rest in Peace as it is destroyed. This means that Rest in Peace is always going to end up in exile when it leaves play. What about the Abrupt Decay? Well, a spell is normally placed into a graveyard once it fully resolves. At that time, the Rest in Peace is no longer in play, meaning that Abrupt Decay does indeed end up in the graveyard.
What happens if more than one replacement effect happen at the same time? Let’s say a there is a Rest in Peace in play and you are enchanted by Wheel of Sun and Moon. One of these cards wants to send cards to exile while the other wants to send them to your library. In the case of multiple replacement effects, the controller of the affected object decides which one to apply. You would choose whether your cards end up in exile or back in your library. The same principle would apply if a player discards a card with a replacement effect like Blightsteel Colossus (but not cards with a trigger like Emrakul, the Aeons Torn) while Rest in Peace is in play.
Okay, one more for good measure! What happens if I cast a Cataclysm while I control Rest in Peace and Flagstones of Trokair? Normally you resolve spells in order from top to bottom, and that trips some players up with this interaction. Notice how it says, “and sacrifice the rest.” That means that all of those cards are sacrificed at the same time, not in order individually. Rest in Peace, Flagstones of Trokair, and all the other permanents are going to end up in exile. Flagstones will not trigger since it was never placed in a graveyard. Cataclysm will end up in the graveyard just like in the Abrupt Decay example above.