Quantum sensing from fundamentals to applications