The future electron-positron colliders, either breaking the energy frontier (like ILC or CLIC) or the luminosity frontier (SuperKEKB), impose unprecedented constraints over the new generation of detectors that will be operated in those facilities. In particular, the vertex detectors must be designed for an efficient flavour tagging and excellent vertex reconstruction. To cope with these requirements, highly pixelated sensors with a fast readout, very low material budget and low power consumption must be developed. Although the combination of these factors is a substantial challenge, the DEPFET Collaboration has developed a new generation of sensors that can be operated in such a harsh environment. The DEpleted P-channel Field Effect Transistor (DEPFET) is a pixel sensor that combines detection and internal amplification at the same time. With such configuration, thin detectors with good signal-to-noise ratio and low power consumption can be produced. In this thesis, the optimization and performance of two generation of DEPFET pixel sensors is presented. The characterization of such sensors was not only done using laser and radioactive sources in the laboratory but also beam tests in the CERN-SPS line. In addition, the cooling system of the Belle II detector is presented, based on detailed thermal simulations supported by laboratory measurements over a real mock up.