90% of people asking this question do so because they talked to the Day Care helper, and they said something along the lines of "your Pokemon don't like each other". If this applies to you, then your Pokemon WILL breed, just at a lower rate than possible. (That is: you need to walk more steps on average to get an egg.)
(Low breeding rates happen when your breeding pair has the same species, or the same ID number, or both. Check this table on Bulbapedia for more detail. The solution is to get on your bike, ride around a lot, then check again.)
If the above does not apply to you, then use the per-game "quotes blacklist" below to get confirmation on whether your Pokemon are compatible. Then, if you know your Pokemon are incompatible, check the list of reasons why your Pokemon may be incompatible at the bottom of this post to find out why.
If you speak to the Day Care/Nursery helper in your game and they make any of the following statements, then your Pokemon are not compatible for breeding. Check the list below to find possible reasons why. If the helper doesn't make any of the EXACT statements below, then your Pokemon ARE compatible for breeding.
G/S/C: "It has no interest in [Pokémon]."; "It's brimming with energy."
R/S/E/FR/LG: "The two prefer to play with other Pokémon than each other."
D/P/Pt/HG/SS/B/W/B2/W2/X/Y/US/UM/Sw/Sh/BD/SP: "The two prefer to play with other Pokémon more than with each other."
OR/AS: "Those two would really rather play with other Pokémon, though, and not each other."; "Seems they’d rather play with other Pokémon—not so much with each other."
S/M: "They don't seem to like playing together, though."
Reasons for incompatibility
This is an exhaustive list of reasons why your Pokemon may be incompatible for breeding. If your Pokemon are incompatible, then you must get new parents. There is no way to turn an incompatible pair into a compatible pair.
No common Egg Group: For two Pokemon to breed, they must have at least one Egg Group in common. If they do not, they will never breed.
Same gender: For a breeding pair to be compatible, one Pokemon must be male and the other must be female. If the Pokemon have the same gender, then they will never breed, even if they have the same Egg Group. However, gender does not factor when breeding with Ditto.
Genderless: Genderless Pokemon cannot breed, unless they are paired with Ditto.
Undiscovered Egg Group: All Pokemon belonging to the Undiscovered Egg Group are unable to breed. This includes all Legendary and Mythical Pokemon (except Manaphy), Ultra Beasts, and Gen 8 Fossil Pokemon, as well as "baby Pokemon" (details), and oddities like Nidorina and Nidoqueen.
Ditto on Ditto: Ditto cannot breed with other Ditto.
Gen 2 in-breeding: This applies if you see "It's brimming with energy." In Gen 2, Pokemon will not breed if their Defence IV is the same and their Special IV is different by 0 or 8. The mechanic is designed to stop you breeding Pokemon with their children. It works because in Gen 2, offspring always inherits the Def IV and the SpD IV different by either 0 or 8 from the parent of the opposite sex. However, unrelated Pokemon can be affected by this feature on random chance, if you're unlucky. Just replace one of the parents and try again.