What is a certificate of deposit (CD)?

A CD is a time deposit where you earn interest on money you store in it for a set period of time. But there's a penalty to access funds early.