Stochastic processes, statistical inference and efficient algorithms for phylogenetic inference