A prism has a polygonal base and a face opposite and congruent to the base, while a pyramid has a polygonal base and an apex at the opposite side. The edge of the pyramid's base and its apex form a triangle, and the number of sides of its base dictate how many triangular faces are present in the pyramid.
The confusion between a prism and a pyramid lies in the fact that both are polyhedrons, which are three-dimensional solids characterized by flat faces, sharp corners and edges that are linear. The difference is the existence of a face opposite to the polygonal base. If the base of the polyhedron is opposite to a face with the same shape and size as the base, the object is a prism. However, if the solid's base is opposite to a point called the apex, then the figure is a pyramid.
Another reason for the confusion is the shape of most tangible prisms. The most common type of prism is the triangular prism, which is composed of a triangular base, a congruent face atop it and three rectangular faces. If the viewer looks through the prism with the base in front, the shape looks like a three-dimensional triangular structure, which is often attributed to a pyramid.
The nomenclature for both solids is based on the shape of the base. If the base is in the shape of a triangle, then the solids formed are a triangular prism and a triangular pyramid. If the base is a regular five-sided polygon, the figures are called pentagonal prism and pentagonal pyramid.