Here’s everything you need to know about low-cost index funds, including how they work and how to buy them.