One of the ways is by displacing or compressing the brain and affecting the function through pressure, the other is by actually invasion of the tumor into the brain and directly injuring or affecting the pathways that conduct the electrical impulses. 