There are basically two different sources for CDs.
The most common are CDs that you buy directly from a bank or credit union. Those CD usually have an early withdrawal penalty of x months of interest if you cash them out before maturity. The problem with these is if you chase interest rates you can end up with accounts with many different banks or credit unions which some consider a PITA.
Brokered CDs are issued by banks and sold through brokerage firms like Schwab, Fidelity, Vanguard, etc. They are similar to bank CDs in most respects except if you cash them in before maturity you do so by selling the brokered CD on the open market like you would sell a bond. In this case, the early withdrawal cost is based on changes in interest rates and may be more or less what the early withdrawal penalty on a bank CD would be.