Noise are eliminated by suitable filters. Normally you need low pass filter to remove the low frequency noise and a high pass filter to eliminate the high frequency noise and a notch filter to eliminated the interfere from the mains 50Hz. By searching the web you can find many filter circuits in use with the EEG signals. Josef brought a link for such filters.
For more information please refer to the link:Article Development of a portable DAQ-based Electroencephalogram System
Years ago I was building some simple EEG probe - so called "Alpha-mind monitor" to detect brain alpha-waves for self-training of deep relaxation. The practical lesson learned was that the sensing electrodes must be low-noise non polarized (e.g. http://www.eegelectrodecap.com/sale-9526393-pellet-disc-sintered-ag-agcl-electrodes-non-polarized-electrodes-for-neuroscience.html) and also the well- symmetrized differential sensing is very needed approach. Otherwise, lot of noise at any movement of the subject appeared. Of course, an active filtering also may help a lot.
First, noise are eliminated by using proper shield cable for the biomedical applications, and the connected electrode must be fixed properly. After that using the suitable filters. The main spectrum of the frequency band is between around 1 Hz to around 30 Hz. You need LPF to remove the low frequency noise and the interfere from the mains 50Hz. However, you need another LPF as the feedback circuit from the output to the input of the circuit to be equivalent to HPF. Refer to the text book, John G. Webster, "Medical Instrumentation Application and Design," .
The first means is to apply some kind of driving signal: an equivalent of the RLD (for Right Leg Driver) seen in ECG setups to lower the "drift" of the signal source, basically any kind of driving signal should do. The above answers seem to assume that this has been already done; but from my experience this might not be the case. Neither in EEG nor in ECG.
Beyond that: there's a plethora of filters available, none "perfect" in the sense of removing all noise and leaving the signal-of-interest unaltered. If you have the power to go for digital filtering, this might be preferred (provided your digitized signal has enough resolution) as digital filters can do 'magic' unseen in the analog domain.
After you are are sure that the analogic part of your project is correct, the best way is acquire digital data in al losseless way and analyze it. A 16 bit - 1 Ks/s differential system can be sufficient. You can obtain the frequency distribuition of your signals witth a FFT and use a digital filter to select a band of frequency; or, you can use pattern recognition techniques or signal transformations like wavelet to find a signal sequence.
I suggest the lecture of this book "EEG signal Processing".
If the noisy signal is a result of interference with other brain signals, the blind source separation techniques (or ICA) are very useful. But if the noise is generated from the electrical cct or cables filtering is recommended
Proper shielding is the common way is the way to reduce noise. If you still receive noise even after applying some LP filter I would recommend to use differential approach to cancel out the noise. This will drastically improve CMRR.
@Reem shared link is useful, averaging is not good option for real time. Noise can be filtering and smoothing is best way like I am using SG filter for smoothing the of my data in python (Not EEG signal). link of Comparison of Smoothing Filters in Analysis of EEG Data for the Medical Diagnostics Purposes. doi: 10.3390/s20030807.
Process and Save files in Dataframes and Datasets with HDF5, It is easy to handle larger data than CSV or other file ext.