Topological media are systems whose properties are protected by topology and thus are robust to deformations of the system. In topological insulators and superconductors the bulk-surface and bulk-vortex correspondence gives rise to the gapless Weyl, Dirac or Majorana fermions on the surface of the system and inside vortex cores. In gapless topological media, the bulk-surface and bulk-vortex correspondence produce topologically protected gapless fermions without dispersion - the flat band. Fermion zero modes forming the flat band are localized on the surface of topological media with protected nodal lines and in the vortex core in systems with topologically protected Fermi points (Weyl points). Flat band has an extremely singular density of states, and this property may give rise in particular to surface superconductivity which in principle could exist even at room temperature.