The relative merits of these two options have to do with the amount of risk you are willing to take and the amount of reward you are hoping for.
A CD is a very low-risk investment. CDs are bought through banks and typically have a guaranteed interest rate attached to them. They are also insured by the FDIC. These facts mean that you will get a guaranteed return and you cannot lose your money.
The downside to the CD is that you cannot get a large return the way you can on stocks. With a CD, you are going to get a certain interest rate, but there is no chance of a larger gain. With stocks, it is possible that the stocks you buy will increase a great deal in value and you will make much more than you would if you bought a CD. However, you have to balance that against the risk that your stocks would go down and you would lose some or all of the money you invested.
So, CDs are low-risk, low-reward investments while stocks offer higher potential rewards but have serious risks.