A cipher is a message in code, or the key needed to decrypt that code. For example, a message could be written in secret by exchanging each letter for a different letter. In order to read it, a person would need to know which letters had been substituted for what. Ciphers and codes have been used from ancient times to modern day to send secret messages and keep important information safe.
Code is information converted into another form. This could be to keep the information secret (as explained above), or to change it into computer programming language which explains exactly what the computer is going to do (source code). Computer programmers work with this source code, which is then translated into binary machine code (a list of 1s and 0s) that a computer can read directly. Source code can often look like gibberish to a person who has no experience with it, and machine code would be completely unintelligible. Rick would have no hope of interpreting it.