The Mathematical Definition of a Pyramid:  A polyhedron with the property that all but one of its vertices lie in a plane.

If the pyramid has n+1 vertices, then n of those vertices will form an n-sided polygon in a plane (which one might think of as the base of the pyramid).  The remaining vertex is the apex of the pyramid.  All of the faces of the pyramid (excluding the base) are triangles.  In the following illustrations, the bases are a square, a triangle, a rectangle, a rectangle, and a pentagon.