Observations and the study of the cosmic Dark Ages, Cosmic Dawn and Epoch of Reionization (EoR) using the all-sky averaged redshifted HI 21cm signal, is one of the primary science goals of most of the ongoing or upcoming low-frequency experiments like EDGES, SARAS, and the SKA. This signal can be detected by averaging over the entire sky, using a single radio telescope, in the form of a global signal as a function of redshifted frequencies or as a power spectrum. One of the major challenges for the detection of this signal is the accuracy of the foreground source removal. Several novel techniques have been explored already to remove bright foregrounds from both interferometric as well as total power experiments. We present the results from our investigations on the application of Artificial Neural Networks to extract the faint 21-cm global signal and 21-cm power spectrum amidst the sea of bright galactic foregrounds. We show that the signal parameters can be extracted with an accuracy of ~92% even in the case of mock observations where the instrument has some residual time-varying gain across the spectrum, in the case of Global signal measurements, while the accuracy levels for the parameters for 21cm PS from mock observations range between 30-65%.