The fairy tale Snow White and the Seven Dwarfs was collected and published by Jacob and Wilhelm Grimm (the Brothers Grimm) in their seminal compilation Children's and Household Tales (Kinder- und Hausmärchen) in 1812.
The Grimms did not "invent" the story; they collected oral folktales from German storytellers (notably Dorothea Viehmann and the Hassenpflug family) and edited them for publication. Their version—with the poisoned apple, glass coffin, and the dwarfs' names—became the definitive text for later adaptations, including Disney's 1937 film.