Theory of topological insulators and its applications