A blackbody is a rigid, closed unreal body that can absorb all electromagnetic radiation that falls on it regardless of its frequencies, but it reflects none. Hence, it is a perfect emitter and absorber of thermal radiations following Kirchhoff's law.
An ideal black body is an imaginary perception of Gustav Kirchhoff that played a significant role in the development of quantum mechanics. Every object in the universe absorbs and emits electromagnetic energy to a certain extent under favorable conditions. But a black body absorbs all the electromagnetic radiation falling on it without limit from all directions. Consequently, it is black.