A fundamental challenge in developing brain machine interfaces (BMIs) is building a decoder between patterns of brain activity and movement in patients with spinal cord injury, ALS, and amputation because these patients cannot move their intact limb . We demonstrate two approaches to solving this problem. First, we show that visual observation of action can automatically trigger mirror-like responses in primary motor cortex that are similar to the responses that occur during action. Using these mirror-like responses, we show that brain activity can be mapped to movement without overt arm movement. Second, we demonstrate that amputees can learn an arbitrary mapping between brain activity and movement of a robot after long-term exposure to a BMI. Moreover, we also show how the functional connectivity among neurons controlling the robot undergo modifications during BMI learning which may provide an interesting model of motor skill acquisition.