"They Can Certainly Try"
If it isn't in some form of code, you can "read" any spell if it is on your spell list just fine as evidenced by the fact that you can read scrolls of spells on your spell list even if you don't know the spell. Which means any cross over your class has with the book, you'll recognize.
If it isn't on your spell list, and you're proficient in Arcana and the book isn't in code, you should be able to try "read" it with something like an Arcana check.
Arcana
Your Intelligence (Arcana) check measures your ability to recall lore about spells, magic items, eldritch symbols, magical traditions, the planes of existence, and the inhabitants of those planes.
That doesn't mean you can grasp the spell from the spellbook enough to cast it. This will tell you what is written in the book. You'd learn what spells are in the book and their general effect.
Think of it like a research paper or college text book of a subject you're not versed in. You can gleam, "Oh, this is a paper on the Solvent Energy of a Protein in a Dialectic Solution", but you don't have the ability to take action on that unless you're versed in that field.
Casting From It
You can't cast it without fully understanding it. Which, for a wizard, requires studying it and copying it into your own notation into your spellbook which requires time and gold. And then preparing it.
For each level of the spell, the process takes 2 hours and costs 50 gp. The cost represents material components you expend as you experiment with the spell to master it, as well as the fine inks you need to record it. Once you have spent this time and money, you can prepare the spell just like your other spells.
For other classes, knowing that it is a fireball spell doesn't allow you to cast it - unless it is a ritual, and you have the Ritual Caster feat or an appropriate class feature, then you may be able to cast it depending on your particular ability.
Magic Item Spellbooks
Some magic item spellbooks might be the exception to that. The DMG lists a few.
- Book of Vile Darkness
- Tome of the Stilled Tongue
These are just fancied-up spellcasting foci that grant spells, benefits or other effects (Book of Vile Darkness can cause insanity, for instance).