If a bit is 1 in a TRIS register it is an inputyou are correct, I was jumping to this PIC Programming cold water without bringing any swimming specs or even wearing the swimming shorts!!
By making one of pin Low, and the other side (anode) is VDD, it means there is potential difference and the current flows. And making the pin low is by setting the Tris to 0?? or LAT to 0?? Which is which, what are these basic meanings?
If a bit is 0 in a TRIS register it is an output
The value or state of output pins are set by the LAT register
Example
TRISB=0b11110000 // 0xF0
LATB =0b10101010 // 0xAA
on the pic pins
bit 0 will be 0
bit 1 will be 1
bit 2 will be 0
bit 3 will be 1
bits 4-7 are inputs and do not have any voltage on them. To the outside world the are tri-stated.
You have done well with the info provided here but we need to get you to start reading manuals, tutorials, and datasheets. That is unless this is your one and only project.