This question has always bugged me. The interdict of Merlin stops spells being learnt from anything but a living mind. Yet Tom Riddle is specifically said to have learnt the horcrux spell from a book. Why are there even spells in books?
Who would believe the ritual for the philosopher's stone that is written down since no one can learn it from a book anyway?
The existence of books containing and describing spells seems completely illogical in that world.
Eliezer replied on stack exchange:
I don't regard my own answers as canon when they haven't been recorded in the text itself, but Opinion of God is that the Interdict of Merlin applies to magical secrets that can directly or indirectly lead to wide-scale catastrophes if revealed. (It's possible that Harry's Brown Note for the Patronus Charm would fall into this category, even though it's not a secret that causes a nuclear-scale explosion as such.) Harry Potter and the Methods of Rationality includes instances of people learning relatively strong magic from books (e.g., Tom Riddle and the original horcrux spell), not to mention that Hermione is explicitly shown in-scene to have learned sixteen spells just from reading books. It's implied however that the art necessary to create e.g. the Deathly Hallows, or to raise Hogwarts, was unrecordable and therefore lost.
He learned it from the Baskilisk in the chamber of secrets, I believe, as Professor Quirell mentions it, that is the way he learned Horcrux, and how he built the second level version.
Somewhere at the book, Professor Quirrell(who turn to be...) said that Voldemort found the Chamber of secret. Then he ask Harry why did Salazar created the basilisk(instead of just write whatever he wanted), and the answer was the interdict of Merlin. So I guess he learned it from there.
Mod note: Added spoiler tags
The interdict of Merlin stops the indiscriminate spread of high level magic, for a definition of high-level that is relative to the learner. It is probably possible in principle to write down a series of hints that lead the reader to figure out enough of the concepts themselves that they can read the next level of hints. I expect lots of people *try* writing down their material and leaving such a trail of hints, and while it usually fails Riddle probably independently figured out enough stuff to bridge the gaps.
One would imagine that someone would be able to learn the spell mechanics from a book, do all the hard work, so to speak, but require a living person knowing the spell to "animate" it :) Though it is definitely not how HPMoR presents it. Also, how, in that world, would wizards be able to invent new spells, if knowledge can only be passed down?
The Interdict isn't depicted in the series - with a few possible exceptions - if a wizard casts a spell with "incomprehensible words" that might be it. (For some reason it doesn't seem to apply to sufficiently basic magic spells - most of the magic that's been retained might fall into this category though.) What follows is thus speculation:
Yes, wizards can invent spells. The Interdict is like a spell that prevents you from reading people's notes on their new spells, or hearing the words (possibly without their permission). It prevent knowledge transmission (but not generation) via "non-living mediums". And possibly, unintentional verbal transmission, but not intentional.