Both words until and by indicate “any time before, but not later than.”
To understand the difference in usage between until and by, it’s necessary to distinguish between those verbs that express a continuous action, such as stay, live, walk, drive, sleep, etc., and those that express an action performed once, such as arrive, leave, return, finish, pay, crash, etc.
Use until (NOT by) with verbs that express continuity, as “be away” (stay in another place) does in the first sentence in the question. Until may be a preposition as in sentences (a), (b), and (c), or a subordinating conjunction, as in sentences (d) and (e):
||They lived in a small apartment until June 1998.
||We’re going to drive until dark.
||Harry was so tired that he slept until noon.
||The baby didn’t walk until he was 18 months old.
||Did you really speak only French until you were ten?
These verbs refer to a continuous action, as opposed to those verbs referring to one action performed at a specific point of time.
Use by (NOT until) with verbs referring to one action performed at a specific point of time, in affirmative sentences and in questions. “Be back” (return to the original place) is an example of this kind of verb in the second sentence in the question. Here are other examples:
||You have to finish by August 31.
(August 31 is the last day you can finish; you may finish before this date.)
||Jack had left his office by 5:15, so he didn’t know about the burglary.
(Jack left his office at some time before 5:15 or at 5:15. 5:15 is the last possible time he could have left.)
||If the plane arrives by noon, we’ll have lunch at the new restaurant near the airport.
(The plane will have arrived at some time before noon, or at noon at the latest.)
||Do we have to pay our taxes by April 15?
(Is April 15 the last date when we can pay our taxes?)
However, with negative verbs referring to a point of time, we can also use until. Sentences (f) through (i) are changed to their negative forms in (j) through (m) below, and may also take until, with a slightly different meaning:
||You don’t have to finish until August 31.
(You can stay in the situation of not having finished for all the time up to August 31, but that is the last day you will have to finish.)
||Jack didn’t leave his office until 5:15, so he knew about the burglary.
(Jack stayed in the situation of not leaving his office during all the time before 5:15, but at 5:15 he left the office)
||Even if the plane doesn’t arrive until noon, I’ll still be there.
(The plane is in the air, and might arrive at noon, not before.)
||We don’t have to pay our taxes until April 15.
(We don’t have to pay our taxes for all the time before April 15; on April 15 the situation changes, and we have to pay our taxes.)
Consider these negative sentences (j) through (m) as referring to a continuous state: a situation of not “being” something or not “doing” something, which continues up to a certain point, the time that is mentioned. At that certain point, an action – finishing, leaving, arriving, paying in these sentences – takes place.
The slight difference in meaning of (j) through (m) in contrast with (f) through (i) is that in (f) through (i) the action of finishing, leaving, arriving or paying may occur before the time mentioned, whereas in (j) through (m) the action occurs at, not before, the time mentioned.
Source www.pearsonlongman.com – message board