5 types of investment and how they work