The idea of capturing signals from a brain goes back to the end of the XIX century when it was discovered that living brains (first in rabbits) have an electrical activity. The first recording (EEG) of the electrical activity of a human brain took place in 1924 (Hans Berger) but till the end of the XX century we cannot talk of a brain-computer interface. This is the result of amazing progress in signal processing as well as several other technologies, software taking the lion's share.
A better way of sensing electrical activity, more sensitive and more focussed, creates a huge amount of data that can to be processed to derive an understanding of their meaning. It is important to notice that at brain level, differently to what happens at, lets say at a nerve termination on a muscle, we don't have a one to one correspondence. It is not like: contract - relax corresponding to a single signal in the brain whilst we have such a correspondence at the nerve termination in a muscle.
Intercepting electrical signals generated by brain activity is crucial and today's technology is not really up to the task of balancing accurate recording with low risk and acceptable discomfort for the "brain owner". The best detection today is based on electrocorticography, which requires the implant of electrodes on the surface of the brain (see figure). This allows the capture of signals at 500 Hz whilst electroencephalografy can monitor signals up to 40Hz. Advances in sensors foresee the use of graphene to create a ultra thin layer that can harvest signals from the whole brain surface. Still, this would require surgery to place the sensors on the brain. Similarly, researchers have found ways to insert micro electrode in the brain to detect signals in very narrow areas and to place micro arrays on the cortex to detect electrical signals flowing in a specific part of the brain.
The alternative, so far, is to use external sensors, as shown in the third figure. The signals captured are much more difficult to interpret although progress have been made in the last five years. In the figure there is a whole net of sensing electrodes, other BCI are based on fewer sensors and provide a more coarse representation of the brain electrical activity that, however, thanks to signal processing, may be sufficient for some basic interactions, like moving a cursor on a screen or a robotic arm.
Notice that so far the interaction is in the direction Brain to Computer. Achieving the reverse, sending meaningful information from a computer to a brain is still years away.