Discrepancy Theory and its Applications