When you attach files to a note are they copied there?

Yes but Joplin will rename the file to a random generated id so I think its better for some files to have it stored outside. You can press ALT key to link files instead of copy.

Maybe we can have an option to have either link or copy as the default and press a key to change it

Option in Joplin
On drag+drop files/folder:
Create link to files/folder - ! (file:///C:/Users/dgo/AppData/Local/Temp/msohtmlclip1/01/clip_image001.jpg)

Copy files/folder - 4603da4d82e037a2ff3d21f86fc84796.picture

Reference
Link to local file ressources?
How can I convert a file link to a resource link?