Dijkstra Algorithm is just shortest path for weighted graphs with a twist:
Everytime you encounter a vertex as someone else's adjacent, you have to ask: is this new path a shorter path than what we already have? If so, update it.
Check with: new distance = current vertex distance + edge[current_vertex][vertex_we_are_checking]
Update is new distance is less than what we already got.
And if so, you then have to update the Path[] as well
For example if at first we think source to D is 100.
If however, D is also adjacent to B AND the distance from s to B is 10 and the distance to B to D is 10...10+10 is obviously less than 100.
So in that case, we update the distance of source to D to 20 and we update the Path[] to D to B instead of s.
In the end of the day, we will have an array of all the vertex shortest distances from the s as well as Path[] which is the vertex before shortest path.