Absent without leave (AWOL) and desertion are similar in that military members are not where they are supposed to be at a given time, but the two terms are not interchangeable.
The main difference between the two is time. Usually, after one month of being AWOL, a military member can be considered a deserter. The National Guard and Reserve have their own standards as well.
There are other key differences between the terms AWOL and desertion, which can be easy to confuse. Unauthorized absence from the military falls under three articles of the Uniform Code of Military Justice (UCMJ): Article 85, Desertion; Article 86, AWOL; and Article 87, Missing Movement. Of the three, desertion is the most serious offense.
A military member has violated Article 87 if he or she is ordered to be on a ship or an aircraft, or deploy with a unit on a certain date and time and then fails to show up. It doesn't matter if the member failed to show up intentionally or because of neglect, but it is required that the member knew about the movement.
If the member missed the movement through physical inability (as long as that physical inability wasn't a result of misconduct or neglect), that would constitute a viable defense. The punishment is more severe if the member missed the movement intentionally. It's not uncommon for Missing Movement to be charged in conjunction with AWOL or desertion, depending on the circumstances.
The use of UA by the Navy/Marine Corps and AWOL by the Army/Air Force has a historical component. Prior to enactment of the Uniform Code of Military Justice in 1951, the services were governed by separate laws. However, its official title under the current UCMJ is AWOL. It simply means not being where you are supposed to be at the time you are supposed to be there.
Being late for work is a violation of Article 86. Missing a medical appointment is a violation. So is disappearing for several days (or months, or years). The maximum possible punishments depend on the exact circumstances surrounding the absence.
A charge of desertion can actually result in the death penalty, which is the maximum punishment during "time of war." However, since the Civil War, only one American servicemember has ever been executed for desertion: Private Eddie Slovik in 1945.
The offense of desertion, under Article 85, carries a much greater punishment than the offense of AWOL, under Article 86. If one is absent without authority for 30 days or more, that doesn't automatically change AWOL to desertion. The primary difference between the two offenses is "intent to remain away permanently" or if the purpose of the absence is to shirk "important duty," such as a combat deployment.
If a person intends to return to "military control" someday, he is guilty of AWOL, not desertion, even if he was away for 50 years. Conversely, if a person was absent for just one minute and then captured, he could be convicted of desertion if the prosecution can prove that the member intended to remain away permanently from the military.
If the intent of the absence was to miss an important function of his or her job, such as a combat deployment, then the intent to remain away permanently to support a charge of desertion is not necessary. However, services such as drill, target practice, maneuvers, and practice marches are not ordinarily considered as an important duty. "Important duty" may include hazardous duty, duty in a combat zone, certain ship deployments, and more.
Whether a duty is hazardous or a service is considered important depends on the circumstances of the particular case, and is a question of fact for the court-martial to decide.
When you sign the contract to enter the military, you will owe a stated time in the service and are expected to honor that contract, just as the military is expected to honor its role as provider for income, pension, health benefits, housing, and food. If you do not honor your end, the military does not have to honor its end and will quit paying you and even place you into military prison if necessary. Usually, however, most members are just kicked out of the military with a less than honorable discharge.