A mainframe is a very large computer with high performance, often large enough to provide all the computing capability for a large organization. Early computers were all, in some sense, mainframes, because typically most organizations only had a single computer.
The first stage of the evolution of computers (up to the late 1960's) was making mainframes more powerful and capable: faster CPUs, more main memory, larger secondary storage (originally tapes, later disks). Large mainframes at the end of this era would fill an entire computer room.
With the advent of minaturized circuitry (for example microprocessors, physical size became a disadvantage, since it put a limit on system speeds, due to speed of light delays. Mainframes continued to exist, but became physically much smaller - often physically smaller than the larger minicomputers of a previous era.