Usage patterns
窓を開けるto open a window
It was hot, so I opened the window.
窓を閉めるto close a window
It started raining, so I closed the window.
窓から〈物〉が見えるto be able to see something from the window
You can see the sea from the window.
窓の外を見るto look outside through the window
I was looking out the window on the train.
窓越しに〈事〉through the window (doing something)
I waved through the window.