Mobile services increasingly depend on precise and reliable positioning solutions. This article provides an overview of the 5G services in need of positioning and discusses how 5G positioning can be tailored to meet specific requirements and device capabilities. It presents the 5G positioning architecture, standardized techniques and requirements outlined in various 3rd Generation Partnership Project (3GPP) 5G releases. It also surveys the literature for the latest advancements in 5G and beyond positioning techniques such as sidelink positioning, carrier phase, Reconfigurable Intelligent Surface (RIS)-aided, massive MIMO, beamforming and hybrid techniques, by reviewing the most recent literature on the subject. Lastly, the article addresses the practical challenges associated with implementing positioning solution in 5G networks.