Use of the IV for the CBC Block Cipher in TLS1.2 I'm struggling to understand at what point a message is encrypted when looking at RFC 5246. The spec gives the generic block cipher in section 6.2.3.2 as:

struct {
    opaque IV[SecurityParameters.record_iv_length];
    block-ciphered struct {
        opaque content[TLSCompressed.length];
        opaque MAC[SecurityParameters.mac_length];
        uint8 padding[GenericBlockCipher.padding_length];
        uint8 padding_length;
    };
} GenericBlockCipher;


So my question is, does the IV get encrypted or not, and does the IV affect the padding?
No the IV doesn't get encrypted. The IV is a random vector to make sure that the ciphertext is not identical for identical plaintext. This would leak information to any eavesdropper. It needs to be unique - and in the case of CBC, indistinguishable from random to the eavesdropper ("unpredictable") - but not confidential.

As the IV is separate from the ciphertext, it does not affect the padding. However, the RFC has this information:


  The padding length MUST be such that the total size of the
        GenericBlockCipher structure is a multiple of the cipher's block
        length.


The IV is included in this structure. This is still correct as the IV is specified as being exactly the same size as the block size (for CBC):


  the IV length is of length
        SecurityParameters.record_iv_length, which is equal to the
        SecurityParameters.block_size.