My recipe calls for Black Pepper. I have Cayenne Pepper.
What ratio should I use to substitute to get approximatively the same "heat"?
I realize that the result won't be quite the same. I am fine with that.
Regarding the amount of "heat" in the recipe, I'd agree with @justkt that you'd want to go with 1/8 to 1/4 (at most) of the specified amount of black pepper if substituting cayenne. I like spicy food and go through a lot of cayenne (and other) chile pepper preparations, and they can vary a lot in terms of strength even within the same variety. So, I'd start on the light end and add more to taste if it's not spicy enough for you.
My wholly unscientific opinion is that when a recipe calls for black pepper in any significant quantity it's for the flavor as much or more than the spicy heat. If you have any ground cardamom on hand you might could toss a pinch of that in as well to replace some of the resinous flavor that black pepper has and cayenne lacks.
Props to Magnus for his excellent and botanically accurate answer.
You can't really substitute cayenne pepper for black pepper. They're completely different, not even in the same botanical order. Cayenne pepper is a powdered chile. Black pepper is tiny drupe. The heat in cayenne pepper comes from capsaisin, and the pepperyness in black pepper from piperine.
Closer substitutes would be white peppercorns (in moderation!), green peppercorns, red peppercorns or grains of paradise.
Of course, you still could use cayenne, but the taste would be as different as if you were to substitute it with allspice, or cumin, or some other spice. If you were to substitute it with cayenne, there's not really any ratio that is applicable, you would have to add it to taste.
They're not the same.
The amount of "heat" experienced is also different based on a number of factors.
E.g. When did you add the pepper? How much fat is there in the dish to carry more of the heat (think chili oil). Whats the serving temperature Are there any milk prouducts in the dish( tempers the heat)
You really have to taste and adjust.