tl;dr
How I handle spell acquisition in my own campaign.
When a magic-user character is created, they begin at level one with a rather limited magical repertoire consisting of Read Magic and 1-4 other randomly determined first-level spells. These are the spells allowed them by their erstwhile Master before being thrust out into the world to make their own way.
When they train to rise in level, they come away from their training with one new spell of their new level. Note that this assumes that the training is done under the guidance of a Master of higher level; if the wizard self-trains, then no new spell is gained.
Apart from the above circumstances, new spells must invariably be garnered in the course of the wizard's adventuring career.
The idea of a free exchange of knowledge is far from common amongst the wizarding community, and as a rule, magicians tend to become more and more secretive about their knowledge and skills as they gain in power. The only other wizard who can be relied on to share knowledge is the Master under whom one's apprenticeship was taken, and even then only if the Master and apprentice parted on good terms, and only to a very limited degree. The price for this cooperation is generally an undertaking to perform any tasks required by the Master, and naturally those tasks will likely be those the Master would rather not have to take care of themselves, due to their unpleasant or tedious or dangerous nature (or, likely enough, all three). Note that this is pretty much the only reason that any wizard would burden him or herself with an apprentice at all; few magicians are of a naturally charitable nature.
Transcribing Spells From Scrolls
The most common source of new spells is from scrolls: bought, found or stolen — and only the most common and puny of spells will generally be available for sale. Scrolls, unlike spells indited within a spellbook, are essentially charged one-use magic items and must be reverse-engineered to be transferred into a reusable set of instructions. This will require the use of one Read Magic spell per two spell-levels, to read the text without activating its magic, and to allow a literal transcription to a non-volatile form. Once that is done, the wizard can attempt to transcode the scroll text into their own notational system as if translating spells from another wizard's spellbook (see below).Transcribing Spells From The Spellbook Of Another
Every wizard, in the course of their career, develops their own unique and idiosyncratic system of notation, based originally on that taught to them by their original Master, but diverging further and further as they undergo their own unique experiences and develop their own mnemonic codes and so on. For this reason, the spellbook of another wizard will almost never be immediately comprehensible, and will inevitably require careful study to allow a workable translation.Assuming that magical means of translation aren't available, the chance of being able to decipher enough of a specific wizard's code to be able to then start transliterating the spells within his or her book(s) has a base of 50%, assuming the writer of the book is of the same level as the magician attempting to decode it.
This is modified by plus or minus 5% per level of difference between the reader, and writer at the time of writing. For example, a 5th level reader trying to decode the book of a 10th level wizard (5 levels below) would have a 25% chance of success. The same 5th level reader deciphering the book of a 1st level magician (4 levels above) would have a 70% chance to succeed.
This initial period of study takes 5-30 days, after which the d100 is rolled for success.
If the reader succeeds, they can then begin translating the instructions within the book into their own system of notation. As a rule, this will take 2d4 hours of uninterrupted concentration per page, and will, of course, require access to inks, pens, and drawing instruments. This process requires absolute precision, and is not the sort of thing it would be wise to undertake in the Wild or the tunnels of the Underdark.
The chance of successfully transcribing a spell is the same as that of deciphering the notational system, but there is no limit to the number of times a failed attempt can be repeated. Note that in general the only way to find out if you have correctly transliterated the instructions is to attempt to cast the new spell.
Decoding a spell already known is considerably easier than attempting to decode instructions to one that is completely new. Add 5% to the chance of a successful transliteration for every character level above that of the level of the known spell. For example, a 5th level decoder attempting to transliterate a known 3rd level spell would add 10% to the chance of success (2 levels difference = +10%).
Each time a spell from a particular source is successfully transliterated, add 5% to the overall chance of success, to a maximum of +25%, as the decoder becomes more and more familiar with the original system. Success is never absolutely guaranteed however, and can never rise above 99%. (This includes multiple spells taken from scrolls, assuming that all were created by the same wizard).