The list of what should NOT go into compost is fairly large to be sure. Some things are just to obvious to mention - but I will do anyway :)
To state the obvious, only organic material should go into the compost heap. I say this because my sister for one, seems to think that plastic flower pots and labels will rot down with the compost!
OK so back to organic no-no's
Dog or cat poo and any poo from a carnivore should not go into compost.
Straw is ok in limited amounts to add 'brown content'
Dairy products
Eggs, meat & fish (except the egg shells which are ok)
Any baked food such as break, cakes etc
No cooked foods especially greasy foods.
Glossy mags or colored paper - brown or white plain paper only.
Pig manure (this has to be composted seperately as it can carry dangerous worms pathogens)
The reasons that various materials cannot be used in compost vary, but usually reveolve around the fact that they cannot rot at all, or they can rot but leave behind unwelcome pathogens or worms dangerous to humans.
There is also the fact that certain dairy products can attract vermin or even Bears to your compost heap.
For more info on composting and building a 3-bin composting area check out this post
https://planterspost.com/pallet-composting/