Nowadays, new challenges arise relating to the compensation of power quality problems, where the introduction of innovative solutions based on power electronics is of paramount importance. The evolution from conventional electrical power grids to smart grids requires the use of a large number of power electronics converters, indispensable for the integration of key technologies, such as renewable energies, electric mobility and energy storage systems, which adds importance to power quality issues. Addressing these topics, this paper presents an extensive review on power electronics technologies applied to power quality improvement, highlighting, and explaining the main phenomena associated with the occurrence of power quality problems in smart grids, their cause and effects for different activity sectors, and the main power electronics topologies for each technological solution. More specifically, the paper presents a review and classification of the main power quality problems and the respective context with the standards, a review of power quality problems related to the power production from renewables, the contextualization with solid-state transformers, electric mobility and electrical railway systems, a review of power electronics solutions to compensate the main power quality problems, as well as power electronics solutions to guarantee high levels of power quality. Relevant experimental results and exemplificative developed power electronics prototypes are also presented throughout the paper.