Hey there :3
1. It is illegal to download ROM files which you haven't extracted yourself, but it isn't illegal to edit them and make your own hacks. But don't let that put you off it, Nintendo/ GameFreak haven't sued or anything for doing so yet - They don't really care unless you start selling your hacks. Don't worry, nobody will do anything about it.
2. I've never done it since I don't have the necessary components, but you will need a flashcart. I'd suggest searching around on Google or asking some of the people in the Emulation section how have talked about their experiences with flashcarts.
Hopefully that helps :D