What you need to know about investing in dividends