Computer clock technology?
It's not a "sensor", it's a generator; time is not a thing that can be directly sensed. See How does a quartz crystal work?

The crystal does not itself produce the 4GHz signal, that's done with a PLL (as in pgvoorhees' comment): 
 For a PLL Clock multiplier, where does the new clock come from?

Basically, there is a tuning process. A free-running voltage-controlled oscillator (VCO) is set up to run at "about" 4Gz. Its output is fed into a counter. Every tick of the lower frequency crystal, a comparison is made to see if the VCO is "fast" or "slow". For example, with a 4MHz reference crystal, you'd expect to count 1000 VCO clocks for every crystal clock. If the count is e.g. 1057, then the VCO is slowed down a bit.


  what about noise in the amplification procedure


The key quality of a PLL clock is "jitter" - small variations in the timing. They're designed to bring this within specified levels. However, sometimes a modulation is deliberately applied ("spread spectrum") to vary the clock frequency by sub-percent amounts. This makes it easier to pass EMI tests.

Remember that 0.25ns = 250ps, which is (necessarily if your computer is to be useful) many times the delay of an individual gate, which may be in the 1-10ps range.

Note also that the clock frequency can often be adjusted at runtime to save power: How can a CPU dynamically change its clock frequency?