If you don't have a retirement fund at 40, you're playing with fire.
Go to a brokerage firm and look into starting a traditional IRA or Roth IRA. Or, go to your employer and see if they offer a 401(k).
Starting to invest at 40 isn't the end of the world. You can still reach your financial goals in time if you're diligent about putting money away. But you need to get moving as soon as possible.
With investing, time is key. Every day you waste, you won't get back.