Definition
In Korean grammar, the part of a verb or adjective that mostly keeps its shape from sentence to sentence and holds the core meaning is called the stem (어간, eogan), and the tail that attaches after it, changing the function or mood of the sentence, is called the ending (어미, eomi).
Same body, different outfits: how Korean words are built
Remember playing with dolls? You kept the doll's body the same and just swapped its clothes and hats to fit the season. Korean words for actions and states change shape in just that way.
Take 먹다 (meokda, "to eat"). Depending on the situation, we say 먹고 (meokgo), 먹으니 (meogeuni), 먹어서 (meogeoseo), or 먹겠다 (meokgetda). The core part that mostly keeps its shape no matter how the word is conjugated is 먹- (meok-). That is the stem, the pillar of the word.
The pieces attached after it, like -다 (-da), -고 (-go), -으니 (-euni), and -어서 (-eoseo), change shape like clothes swapped for different weather or places. These are the endings, the tail of the word. The stem holds the core meaning firmly, and the ending adjusts the word to fit the situation. There is one catch: in some conjugations the stem itself changes shape, such as 돕다→도와 (dopda → dowa, "to help") and 긋다→그어 (geutda → geueo, "to draw a line").
The magic tail that sets time and attitude
An ending does more than link one word to the next. The ending you choose at the end of a sentence changes the mood, whether the speech is polite, and even when the action happened.
Attach the past-tense -였- (-yeot-) to the stem 공부하- (gongbuha-, "study") and you get 공부하였다, shortened to 공부했다 (gongbuhaetda, "studied"). Attach the intention marker -겠- (-get-) and you get 공부하겠다 (gongbuhagetda, "will study"). To speak politely to someone older, you pick endings like -ㅂ니다 (-mnida) or -세요 (-seyo).
Korean can also string several endings onto one stem like cars on a train. In 가-시-었-겠-다 (ga-si-eot-get-da), endings for honorifics, past tense, and conjecture attach one after another to build a precise meaning. This is the biggest feature of how Korean verbs and adjectives conjugate.
A closer look: stem vs. root
The two concepts Korean grammar students mix up most are the stem (어간, eogan) and the root (어근, eogeun). Both sound like "the center," but they look at a word from completely different angles.
The root is the "seed" that carries the real meaning when a word is first formed. The stem is the "trunk" that stays unchanged when a finished word is conjugated in a sentence. Take 먹히다 (meokhida, "to be eaten"). If you break it down, the root is just 먹- (meok-).
But when 먹히다 is conjugated as 먹히고 (meokhigo) or 먹히니 (meokhini), the unchanging body includes the passive suffix -히- (-hi-), so the whole of 먹히- (meokhi-) is the stem. In short, the root asks where a word came from, while the stem asks what the word looks like when it's actually dressed for a sentence.
Common misconceptions
A stem and a root are synonyms for the same thing.
A root is the "seed" that carries the real meaning when a word is formed. A stem is the "trunk" that stays unchanged when a word is conjugated. In derived words with a suffix, the root and the stem cover different ranges.
Where you meet it
In 달리다, 달리고, 달리니 (dallida, dalligo, dallini; "to run"), the unchanging 달리- (dalli-) is the stem, and the changing -다, -고, -니 (-da, -go, -ni) are endings.
The verb 잡다 (japda, "to catch") also takes many endings after its stem 잡- (jap-), as in 잡고 (japgo), 잡으니 (jabeuni), and 잡지만 (japjiman), to build sentences. By contrast, the adjective 예쁘다 (yeppeuda, "pretty") changes its stem shape in 예뻐서 (yeppeoseo, "because it's pretty").
In one sentence
The stem is the core body of a word that mostly keeps its shape, and the ending is the tail that changes outfits to fit the context.