Global Navigation Satellite Systems (GNSSs) have become an indispensable tool of daily life, since they offer us the possibility of accurately knowing our location in real time and in open-sky environments. Since the advent of these systems, a large number of successful GNSS applications have emerged. Some examples of these applications are: car navigation, flight tracking, sport activity tracking and augmented reality games. Due to the success achieved by GNSS, a great interest is emerging to extend its services to harsher environments such as urban canyons and indoor scenarios. However, in these environments GNSS receivers face great difficulties to detect the signals received from the satellites, which are very weak since they suffer from severe attenuation due to the presence of obstacles in the propagation path between satellites and the receiver. This thesis addresses several problems of processing weak GNSS signals, such as the detection at the acquisition stage, the determination of their signal quality and the time delay and Doppler frequency estimations. To do so, detection and estimation tools are used, which are based on the probability theory and statistics. In order to use these tools, it is necessary to understand the architecture and the signals that GNSSs transmit. For this reason, the first part of the thesis focuses on describing the main features of two of the best-known GNSSs, the American GPS and the European Galileo. In addition, we describe the fundamentals of the receivers and analyze the signals that are implemented in these systems. After that, we explain the required fundamentals of detection theory, namely the Neyman-pearson criterion, the Generalized Likelihood Ratio Test and the Bayesian approach. Then, a review of the state of the art in the detection of GNSS signals is carried out. The main contribution of this thesis is provided in the second part, which tackles the problem of deriving optimal detectors to acquire weak GNSS signals. We have found that the optimal detector depends on the characteristics of the signal transmitted by the satellite, which is different depending on the selected constellation. The theoretical and simulated results show that the detectors proposed in this thesis clearly outperform the detectors currently used in practice. In addition, we conclude when it is better to apply each detector. Moreover, this thesis addresses the problem of estimating the carrier-to-noise ratio of weak GNSS signals. This parameter provides essential information since it is used in all stages of GNSS receivers. In this thesis, we propose new estimators of the carrier-to-noise ratio, which are very simple to implement in high-sensitivity GNSS receivers and offer an enhanced accuracy with respect to the estimators proposed in the literature. Finally, the last part of the thesis focuses on the so-called high-order binary offset carrier (BOC) signals, a kind of signal that is implemented in the Galileo system. More precisely, this part is devoted to proposing accurate estimators of time delay and Doppler frequency. These estimators improve the accuracy of the method usually applied in practice to estimate these parameters.