Batalin-Vilkoviskiy formalism was introduced in 1980s to overcome difficulties of path integral approach to quantization of gauge theories. In the talk we will focus on main physical ideas and mathematical aspects of this formalism. Finally we will treat basic examples arising in field theory.