Hi,
It is simple:
Assume i is the numer of the line. Here we have 7 lines.
We usualy start with line 1
1- You select the leds that you wish highligth on line i using serial data transmission since the HC595 is a serial to parallel shifter.
2- This done you, select the the line i in your schematic this choise is done by an 3:8 Encoder.
That mean that PIC must has as output 000.
3- You wait for a while
4- You lowligth the leds
5- You incremente i
6- if i>7 then move to line 1 else move to line i+1 and repeat previous steps.