"If I create a collection based on a folder, are the photos moved on the hard drive?"
It's hard to imagine a more pointless thing to do. Why would you want a collection based upon a folder? You just use the folder to find these particular photos.
The benefit of a collection (and also of keywords) is that it can allow you to group together and find quickly a bunch of photos that have some similarity in content from across your entire photo library, regardless of what folder they are in.
Think of a collection as like a playlist for your music player, Spotify, YouTube, Netflix… You can make as many playlists/collections as you like, with different combinations of media, different sort orders of the same files, and combining files from different folders. But the actual original files never move from their folders, because you’re only making virtual lists of the files.