Flux compactifications in string theory: A Comprehensive review