(Taken from OU article here):
How long must one wait after eating meat before eating dairy?
The Talmud relates that the great sage Mar Ukva contrasted his approach to waiting after eating meat with that of his father: “If Father would eat meat now, he would not eat cheese until the next day at this time. I, though, will not eat [cheese] at this meal, but I will do so at the next meal” (Chullin 105a). Mar Ukva’s father was super-stringent and went beyond the requirements, whereas Mar Ukva went according to the letter of the law.
Mar Ukva’s practice of “waiting until the next meal” is seen by halachic sources as being the basis for the requirement to wait after eating meat before eating dairy. Posekim, however, do not agree on how long Mar Ukva waited. Some opine that Mar Ukva simply provided us with a general rule: Do not combine dairy and meat at the same meal; and, if you eat a meat meal, you cannot have dairy until the meat meal has been completed. Any further waiting is optional. Others maintain that Mar Ukva advocated waiting a specific duration of time, and that this is what halachah requires.
The Shulchan Aruch presents various approaches. In Yoreh Deah 89:1, Rabbi Yosef Karo—whose authority is binding on most Sephardic Jews—states in no uncertain terms that one must wait six hours after consuming meat before eating dairy. On the opposite end of the spectrum is Rema—whom Ashkenazic Jews follow—who posits that the rule is to not consume meat and dairy in the same meal. While Rema maintains that, according to the letter of the law, one may eat a meat meal, recite Birkat Hamazon and then immediately begin a dairy meal, he asserts that Ashkenazic Jewry has accepted the custom of waiting between meals, and this is a practice that is binding on all Ashkenazim.
Rema further explains that though the custom in his community (Krakow) was to wait an hour between meals, one should wait six hours. Nowadays, most Jews wait six hours, though Dutch Jews wait one hour, and German Jews wait three hours.
(It should be noted that instead of stating that one must wait six hours between eating meat and dairy, Rambam [Hilchot Ma’achalot Asurot 9:28] states that one must wait “about six hours.” Rambam’s intent is a point of dispute among halachic authorities. Some interpret this to allow for a five-and-a-half-hour waiting period.)
Why are there such diverse views on waiting?
It all goes back to Mar Ukva’s statement about waiting “until the next meal.” Some interpret the “next meal” to mean six hours, the average amount of time from lunch to dinner or from a late breakfast—“brunch”—to dinner. (In Talmudic days, most people ate only two meals: “brunch” and dinner.) Others believe Mar Ukva meant that one should wait an hour, the amount of time it takes for digestion to begin (Chochmat Adam 40:13). Those who wait three hours may understand Mar Ukva to be referring to the interval between breakfast and lunch, rather than that between lunch and dinner.
Sephardic Jews must wait six hours as a matter of halachah; there is no room for divergent customs or leniencies (unless there is a medical need, of course). Ashkenazim, however, wait as a matter of accepted custom, similar to the Ashkenazic custom to refrain from eating kitniyot on Pesach. For Ashkenazim, it is always necessary, however, to recite the required berachot upon completing a meat meal before eating dairy. The berachot serve to separate the meals.
If—after waiting the requisite period of time—one finds meat stuck between his teeth, he must cleanse his teeth and rinse his mouth. There is no need to wait any longer. (There is also a machloket regarding the one-hour period. Some posekim rule that a person who always waits one hour needs to clean his mouth before eating dairy, whereas others disagree.)
My personal understanding/interpretation of the basis of waiting (the story told in the Gemara), is that, basically, Mar 'Ukva is saying a couple of things.
1. His father was very pious, and he himself is not nearly so pious, though he admires his father's piety of waiting 24 hours between meat and cheese.
2. He thinks it is appropriate to wait until the next meal to eat cheese (if this meal is with meat).
3. He thinks it is minimally appropriate (if not required; this is ambiguous) to at least not eat cheese with this (meat) meal.
Beyond that, I think how we derive minimum lengths of time depends on how we view these statements. We have a couple of options that I can think of:
A. His statements are meant to be precise measures of time - wait the exact amount of time one would normally wait between meals, or
B. His statements are meant to be situationally dependent - don't eat cheese in this (meat) meal, but wait until the next meal, whenever that is; by the way, if you are offered a snack of cheese between the meals, it's better to wait but it's ok if you eat it. or
C. Very similar to B., except delete the part after the semi-colon (no cheesy snacks allowed).