How do we know what other planets (and stars, galaxies, etc.) are made of? (Intermediate)

See the Answer Here