Branes and applications in string theory and M-theory