When you are searching in indexes, sometimes you don't find what you are looking for because the spelling isn't what you expected it to be. If you haven't already discovered this for yourself, go back and write out the first sentence 100 times before proceeding any further!
OK, having established this principle, how do you deal with it? There are several strategies, and the best one to employ depends on the source you are using. You have to think about how the information was recorded in the first place, and how it has been copied since then. For example, was the name written down as it sounded? This would happen when an illiterate farm labourer registered the birth of a child and the registrar wrote it down. An illiterate person would have no way of knowing whether the registrar had spelled the name correctly; registrars had some guidance on the standard spellings of forenames, but surnames can be much trickier. A registrar, or anyone writing down an unfamiliar name without any way of checking the spelling, will do the best they can, but he result may look quite different from the more usual spelling of the name, and often begins with a different letter. Sometimes it helps to say a name out loud in the local accent. This worked for me when I had trouble with the surname Aveyard in Yorkshire, and the person I was looking for sometimes appeared with the surname Halfyard. If you don't know what a Yorkshire accent sounds like this will make no sense, but trust me, it works.
Then there is the question of copying. Details of births, marriages and deaths were copied by local registrars and clergy and sent to the General Register Office, where they were copied again by GRO clerks (twice - once on transcription slips and again on the index pages themselves, up to 1865). At all stages the names were hand-written in cursive script, so the writers sometimes mistook one letter for another because they looked similar. Letters that look similar when hand-written are not the same as those that are similar in block capitals, or printed. Pairs of handwritten capital letters that can be easily mistaken are F and T, L and S, M and W and more, depending on individual handwriting styles. Another danger area can be combinations of lower-case letters i, m, n, u, w which can be indistinguishable when written quickly, and look like a zig-zag line. You can add a, e, o, v and r to this list with some handwriting styles, and a t where the cross is faint can look like l. Just think of the possibilities! Sometimes a name will be mis-copied as a more common one that looks similar; Hubert has never been a common name, but the similar-looking Herbert used to be very popular and is often worth a try if your Hubert is proving elusive. I have also found David appearing as Daniel - Daniel was much the more common of the two in 19th century England (although the reverse was true in Wales).
Once typewriters and computers are involved, you need to look at the kinds of mistake you make with a keyboard, which are quite different from the ones you make with a pen. I once spent ages looking for the death entry of someone with the unusual surname Quarmby, in the Olden Days when we only had index books, no snazzy databases, fuzzy matches and the like. In the end I found it by accident, only because it happened to be at the top of the page - as QQUARMBY. This was a 1975 entry, and the GRO indexes had been prepared using computer technology since 1969. There seems to be no automated procedure to identify improbable letter combinations like this, which are clearly the result of keying errors; even in the most recent GRO indexes that you can see online (2006 births and deaths on FindMyPast) you will find a number of people called WILLLIAMS (sic).
Of course you then find an extra layer of errors when records are transcribed for websites. Indexers are often working from film or fiche versions of records, which may be hard to read. I don't want to worry you, but by the time you search for a birth, marriage or death online, the name might have been written or keyed up to five times, with five opportunities to get something wrong. But, bad as it sounds, only a small proportion of names are wrong in records and indexes; in my years of experience of researching my own family history and helping other people with theirs, I have fonnd that most people find most of what they are looking for, most of the time.