Revealing the demographic histories of species using DNA sequences