Datasheet AND a search within the forum are the greatest place to learn
TRISA, TRISB, TRISC... to tell if an i/o is set to Input or Output
etc
etc
etc
In the FAQ, you'll find a thread about the Configuration fuses settings