This work contributes to the theory of entanglement distribution in quantum networks in general, analyzing the generation of long-distance entanglement in particular. It is considered that neighboring stations share one partially entangled pair of qubits, which emphasizes the difficulty of creating remote entanglement in realistic settings. The task is then to design local quantum operations at the stations such that the entanglement present in the links of the whole network gets concentrated between few parties only, regardless of their spatial arrangement. Pure-state and mixed-state quantum lattices are studied, and it is shown that useful quantum correlations can be generated over a large distance by means of percolation and network-based error correction, respectively. Finally, a model of quantum complex networks is introduced. These new systems have a very rich topology and exhibit some totally unexpected properties.