To diagram a sentence, draw a baseline and split the subject from the verb with a vertical line. Put the direct object after a shorter line, hang the indirect object and prepositional phrases below the verb, then slant adjectives and adverbs under the words they modify.
Here is My grandmother gave the neighbors a warm apple pie on Sunday., built up one step at a time. Each picture is the tool's own output.
Step 1: Find the subject and the verb
Draw a horizontal baseline. Write the subject on the left and the verb on the right, and split them with a vertical line that crosses the baseline.

Step 2: Add the direct object
If the verb has a direct object, write it after the verb, behind a short vertical line that stops at the baseline.

Step 3: Hang the indirect object under the verb
An indirect object (to whom or for whom) goes on a horizontal line below the verb, connected by a slanted line with nothing written on it.

Step 4: Attach prepositional phrases
Write the preposition on a slanted line under the word the phrase modifies, and its object on a horizontal line at the bottom of the slant. "On Sunday" tells when, so it hangs from "gave".

Step 5: Slant the modifiers
Put adjectives, articles and possessives on slanted lines under the nouns they describe, and adverbs under the verbs, adjectives or adverbs they modify.

For every other structure (linking verbs, clauses, questions, infinitives and gerunds), see our full guide on how to diagram a sentence, with a diagram and a cheat sheet for each rule.