There are multiple ways of doing that (IP/USB/... depended on platform). Here is one way I did it:
1) obtain the code. (quickly configure basic access and IP)
2) check if there is enough memory (show system storage)
3) use command set system services ssh to enable sftp (that allows logging in as root to sftp)
3) load binary code to the system (into /var/tmp/install - create it first). You can also use "start shell" to look if code was delivered.
4) request system snapshot - saves the current JUNOS Software and config in alternative partition (disk).
5) request system software add /var/tmp/install/jinstall-11.4R6.6-domestic-signed.tgz to apply new OS for reload
6) request system reboot - to apply new OS to the box
7) show version - to verify new version of software
If all is a OK - you done. Enjoy new OS!
But in case you want to revert to the previous system do:
8) request system reboot media disk to boot to old OS and config.
9) redo command: request system snapshot to revert flash to old OS
10) request system reboot - revert system back to old state.
You back to old ways.
Be patient with reboots time!