To change things in hardware/cores/arduino, just edit the files. Next time you compile or upload your program, it should use the new source. To change things in hardware/libraries, you either need to delete the .o files or switch boards (in the Tools > Boards menu).