It works by converting each pixel value to its respective ascii character based on its brightness more the brightness more dense the character is chosen to represent the pixel (average is taken for the individual pixel value later mapped to the brightness character)
Recommended Short font size to view the art effectively

