This looks like PIC 18F code.
Each bit in the TRIS register corresponds to one bit in the port. If the bit is '0' the matching bit in the port is an output, if it is a '1' the bit is an input. You have to think in binary to work out which bits are inputs and outputs and then which bits are 0 or 1.
For example:
TRISA = 0x00; //all bits are '0' so all pins are outputs
TRISA = 0x01; // this is 0000 0001 in binary so bit zero is an input
TRISA = 0x0F; // this is 0000 1111 in binary so bits 0, 1, 2 and 3 are inputs.
If your PIC has less than 8 bits on the PORTA, the extra ones are ignored.
If you have pins which you are not using in your design, the best strategy is to make them outputs but leave them disconnected, this will ensure they can not 'float' or be damaged by static build-up.
Also note that on many PICs the pins are shared with other functions so you may for example have to disable the comparators or analog inputs to use the pins as digital inputs or outputs.
Brian.