Modern wireless communication systems rely heavily on multiple antennas and their corresponding signal processing to achieve optimal performance. As 5G and 6G networks emerge, beamforming and beam management become increasingly complex due to factors such as user mobility, a higher number of antennas, and the adoption of elevated frequencies. Artificial intelligence, specifically machine learning, offers a valuable solution to mitigate this complexity and minimize the overhead associated with beam management and selection, all while maintaining system performance. Despite growing interest in AI-assisted beamforming, beam management, and selection, a comprehensive collection of datasets and benchmarks remains scarce. Furthermore, identifying the most-suitable algorithm for a given scenario remains an open question. This article aimed to provide an exhaustive survey of the subject, highlighting unresolved issues and potential directions for future developments. The discussion encompasses the architectural and signal processing aspects of contemporary beamforming, beam management, and selection. In addition, the article examines various communication challenges and their respective solutions, considering approaches such as centralized/decentralized, supervised/unsupervised, semi-supervised, active, federated, and reinforcement learning.