This is a very common question that most people in your situation (interested or fascinated shall I say in Computer Graphics) have and a problem they want to figure out. The solution is pretty simple, though not necessarily that straightforward to implement.
I can't make a specific answer because it depends on the OS you are using, and as I said this is not something you can do in 2 lines of code.
The answer is to use some sort of library that:
- allows you to create a window on your system
- allows you to display some content (an image) in the window you created and displayed to the screen
The first task is generally quite complex regardless of the OS you use (MacOS, Windows, Linux). For the second step, you need to generally go through some sort of graphics API (like OpenGL).
So there is hope for you. One thing you can do is use some other library that works as a wrapper around 1) and 2) In other words they help you especially with the creation of the window, and then if you know OpenGL you can do the rest of the work. You will need to create some texture that you will fill with the content of your image as it gets rendered and display this texture to the screen (that's pretty basic in OpenGL though you need to know this API in order to do so).
GLFW is a great library that will allow you to do that. It's simple to use and compile and install, etc. You can alternatively use Qt but I don't recommend it unless you want to become a professional programmer.
I had some documentation about the whole process but it's offline right now. I might put it back in a few weeks but you will need to wait I am afraid.