I2C Code Composer Studio example for MSP430G2553
SetPinMode(14, OUTPUT) likely as well only sets a value in the register that controls the pin (in pseudocode: pin[14].output=true) . In C that's often done with binary arithmetic (bit manipulation). The registers in the MSP are memory mapped, so writing to these predefined memory regions is writing directly to the machine registers, to which the machine reacts accordingly, as explained in the set of reference manuals (search by chip family and part number). To get an intro on the hardware, any book on MSP or 8-bit microcontrolers in general should be enough.

I'm sure open source implementations for I2C exist, already, e.g. in msp430ware from TI, or other open source libraries, so you wouldn't have to roll your own. If you do try to, though, experimenting is expected, as the official documentation only goes so far.