The idea that events obey a definite causal order is deeply rooted in our understanding of the world and at the basis of the very notion of time. But where does causal order come from, and is it a necessary property of nature? Here, we address these questions from the standpoint of quantum mechanics in a new framework for multipartite correlations that does not assume a pre-defined global causal structure but only the validity of quantum mechanics locally. All known situations that respect causal order, including space-like and time-like separated experiments, are captured by this framework in a unified way. Surprisingly, we find correlations that cannot be understood in terms of definite causal order. These correlations violate a 'causal inequality' that is satisfied by all space-like and time-like correlations. We further show that in a classical limit causal order always arises, which suggests that space-time may emerge from a more fundamental structure in a quantum-to-classical transition.