Index.php defines how to display a loop of posts

category.php does the same thing but it's included when displaying a category archive

WordPress will look for the most specific template it can find, and work backwards until it finds a file that exists, where index.php is the most generic. So long as the template implements the main loop, it will function correctly.

See this handy flowchart to see what WordPress will use:

![enter image description here][1]


  [1]: https://i.sstatic.net/SWY7x.png