What is the difference as far as content-pork, beef?
Pepperoni is a variety of Salami. Salami is a dried sausage which can be made of pork, beef, veal, horse, donkey, poultry or game. Different spices, smoking and vegetable ingredients give the different salame their particular taste.
Pepperoni limits its ingredients to beef pork and poultry and belongs to the more spicy varieties of salame.
Pepperoni is simply a variety of hot salami, derived from Italian salami (soppressata from Calabria or spicy dry sausage from Naples). If there is any difference in the pork/beef ratio, that is not what makes the difference between salami and pepperoni; some variety would use more beef, but that is just a regional difference.
Salami is a generic name used for a product made of ground meat, seasoned and then cured (or smoked). There are countless variations of Salami (here in Italy for example, i think every region has more than one traditional Salami). They can differ from each other on the meat used, the granularity of the grinding process, spices, use of just air or smoke as a method of curing, additional additives and preservatives (usually in industrial produced salmi), curing time..
Pepperoni is simply one of those variations and usually it's smoked and spicy, with a fairly fine grain.
Salami is a catch-all term for a wide variety of dried/cured/smoked force-meats made from pork, beef and poultry, originating in Italy. Every region, and even every city/town/village (and even family in some regions) makes their own variety of salami. They can range from mild (like Genoa salami) to spicy (like sopressata salami).
Pepperoni is actually not an Italian creation. It's an Italian-American creation, just like pizza and spaghetti with meatballs. It's basically just sopressata salami that is even spicier and more thoroughly dried.
In Italy, salami is most often served/consumed at lunch. In the US, pepperoni is most often served as a pizza topping.