A code is one specific  meaning that represents another specific meaning. Do your laundry on Tuesday could be a code for Bring the  cards on Thursday. Codes can be sets of signals such as dots and  dashes (Morse Code), smoke, heliographs, etc. that stand for letters  or numbers. The purpose codes is to send  messages, and except for Bridge, secretly. 
         Bridge bidding for the most part is done in code. Partner's 2 C response to your opening bid of 1 No Trump is the code for: bid your 4 card Major. A 2 D rebid by you decodes into: Partner, I have no 4 card Major. 
        In  Bridge, the codes are not secret messages; they have to be known to your opponents. And  hopefully to your partner. Failure of one partner to fully understand the code of the other has often resulted in dramatic (and costly) results. Playing in a 3 card trump suit or in a doubled /redouble contract that the opponents easily make with some overtricks, are just some of the possible disastrous outcomes of a failure to communicate.
        Sometimes the  bidding system dictate a particular code. In SAB (Standard American Bidding) the 2 C opener is not a weak two bid, but a Big Hand; strong and artificial. In another bidding system (Precision) the 2 C opener means something else. Again your opponents should know the code. No secrets in Bridge. This is done 
by telling your opponents before you start to play (Pre-Alert) of any special codes that you use. Or during the play, Alert or Announce the codes as they arise.
        A cipher is a type of code that uses letter displacement. Example: the letter A is a T; B is a S; C is an R; etc. Then Q F G  F A N F  X F C J  A F Q T V, E I T V  S C L Q N P deciphers into Do not  go to work today, play Bridge. All ciphers are codes, but not all codes are ciphers. 
        Ciphers were the featured type of code used in World War II. (There is the famous German Enigma.) In Bridge bidding there is only one instance that uses the cipher technique: Transfer Bids. A Diamond means Hearts and Hearts mean Spades are ciphers. One particular bid stands for another particular bid. 
        Some players use ciphers for the Minors. 2 No Trump is Clubs and 3 C is Diamonds. (By partnership agreement.) Again the opponents should know the cipher. 
                     PRE-ALERT w ALERT w ANNOUNCE
        The use of codes add a certain type of excitement to Bridge bidding that contribute to the games mental challenge and stimulation.