To answer this question properly, you need to know the definition of a prism and a pyramid.
A prism is a 3D shape that has 2 identical shapes at the opposite ends (may be a triangle, square, hexagon, circle .. ) joined together.
A cylinder is a prism in which the opposite shapes are both circles which are joined to form a 3D shape.
A pyramid is a 3D shape that has a base (may be a square, triangle, circle ...) that rises up to converge to a single point.
A cone is a pyramid in which the base is the shape of a circle and it rises up to converge to a point.