Prophets and teachers would put their hands on people in order to heal them or bless them. In this case, Jesus was healing people.