Random and restricted walks : theory and applications