I will review a series of recent experiments using real-time computational models to investigate how ensembles of neurons encode motor information. These experiments have revealed that brain-machine interfaces can be used not only to study fundamental aspects of neural ensemble physiology, but they can also serve as an experimental paradigm aimed at testing the design of novel neuroprosthetic devices. I will also describe evidence indicating that continuous operation of a closed-loop brain machine interface, which utilizes a robotic arm as its main actuator, can induce significant changes in the physiological properties of neural circuits in multiple motor and sensory cortical areas. This research raises the hypothesis that the properties of a robotic arm, or other neurally controlled tools, can be assimilated by brain representations as if they were extensions of the subject's own body.