In Word Ladder, nodes are words. Two words are connected if they differ by exactly one letter. For example, hit and hot differ only in the third letter, so they are neighbors. Your graph has one node per word in the word list (plus beginWord and endWord). Edges connect words that are one letter apart. The goal is the shortest path from beginWord to endWord. Since all edges have weight , BFS finds the shortest path.
The tricky part is finding neighbors efficiently without comparing every pair of words.