How? Well, under copyright law, people cannot copyright their works indefinitely. Instead, the copyright expires around 50-70 years after the death of the author. This means that editions of classical works from the first half of the 20th century and earlier are now considered public domain.
You could of course print the works you want to play and collate them in a folder. On the other hand, if you have a tablet computer which fits on your music stand, you could work from digital copies right off the net!
To help you get started, here are links to the music of some popular composers: