Flatten layer can be assumed as array of selected image pixel values which you will provide as an input to CNN layers. It is basically applied after the pooling layers. To visualize it there is a toolkit called keract which you can use in Keras in python. Just check the link below.