Relays receive and retransmit signals between one or more sources and one or more destinations. Cooperative relaying is a novel technique for wireless communications that increases throughput and extends the coverage of networks. The task of relay selection serves as a building block to realize cooperative relaying. Recently, relays with buffers have been incorporated into cooperative relaying providing extra degrees of freedom in selection, thus improving various performance metrics, such as outage probability, power reduction, and throughput, at the expense of tolerating an increase in packet delay. In this survey, we review and classify various buffer-aided relay selection policies and discuss their importance through applications. The classification is mainly based on the following aspects: 1) duplexing capabilities, 2) channel state information (CSI), 3) transmission strategies, 4) relay mode, and 5) performance metrics. Relay selection policies for enhanced physical-layer security and cognitive communications with reduced interference are also discussed. Then, a framework for modeling such algorithms is presented based on Markov Chain theory. In addition, performance evaluation is conducted for various buffer-aided relay selection algorithms. To provide a broad perspective on the role of buffer-aided relay selection, various issues relevant to fifth-generation (5G) networks are discussed. Finally, we draw conclusion and discuss current challenges, possible future directions, and emerging technologies.