Beamforming is a signal processing technique to steer, shape, and focus an electromagnetic wave using an array of sensors toward a desired direction. It has been used in several engineering applications such as radar, sonar, acoustics, astronomy, seismology, medical imaging, and communications. With the advances in multi-antenna technologies largely for radar and communications, there has been a great interest on beamformer design mostly relying on convex/nonconvex optimization. Recently, machine learning is being leveraged for obtaining attractive solutions to more complex beamforming problems. This article captures the evolution of beamforming in the last twenty-five years from convex-to-nonconvex optimization and optimization-to-learning approaches. It provides a glimpse of this important signal processing technique into a variety of transmit-receive architectures, propagation zones, paths, and conventional/emerging applications.