Going beyond networks, in order to include higher-order interactions involving groups of elements of arbitrary sizes, has been recognized as a major step in reaching a better description of many complex systems. In the resulting hypergraph representation, tools to identify particularly cohesive structures and central nodes are still scarce. We propose here to decompose a hypergraph in hyper-cores, defined as subsets of nodes connected by at least a certain number of hyperedges (groups of nodes) of at least a certain size. We illustrate this procedure on empirical data sets described by hypergraphs, showing how this suggests a novel notion of centrality for nodes in hypergraphs, the hyper-coreness. We assess the role of the hyper-cores and of nodes with large hyper-coreness values in several dynamical processes based on higher-order interactions. We show that such nodes have large spreading power and that spreading processes are localized in hyper-cores with large connectedness along groups of large sizes. In the emergence of social conventions moreover, very few committed individuals with high hyper-coreness can rapidly overturn a majority convention. Our work opens multiple research avenues, from fingerprinting and comparing empirical data sets to model validation and study of temporally varying hypergraphs.