Your vertex array contains 4 vertices which have an associated index, indicating the position of the vertex in the vertex array.
Your index array contains the indices that make up your geometric primitives which consist of a number of vertices.
The topology describes how the index array should be interpreted. For a triangle list, this means that three consecutive indices make up one triangle, the next three consecutive indices, another triangle and so on.
In your case, you describe 2 triangles: a triangle constituted by the vertices at index 0, 1 and 2, and a second triangle constituted by the vertices at index 0, 2 and 3.
The idea behind the index array is to reuse the same vertices between multiple geometric primitives to reduce memory usage (the index is much smaller than a vertex) and reduce vertex shader executions ("shared" vertices are only processed once).