This paper is the course of lectures delivered by the first author in Kyoto in 1996-97 and recorded by the others. We tried to follow closely the notes of the lectures not yielding to the temptation of giving more examples and names. The focus is on the relations of the Knizhnik-Zamolodchikov equations and Kac-Moody algebras to a new theory of spherical and hypergeometric functions based on affine and double affine Hecke algebras. Here mathematics and physics are closer than Siamese twins. We did not try to separate them, but the course turned out to be mainly about the mathematical issues. However we hope that the paper will be understandable for both physicists and mathematicians, for those who want to master the new Hecke algebra technique.