I would speak first with the landlord (as apartment to me implies that you are renting) to get the OK to install the curtain. Once you have that you would want to install the curtain rod on the wall surface above the window and have it extend beyond the width of the window on each side.
There are a plethora of curtain rod assembly styles that you can choose from. Some are easier to install than others so look at that aspect so you know just what you are getting into before you purchase.
Note that on normally wood framed construction buildings you have about three inches of space to the side of the window and at least that much above the window where you can screw the curtain rod brackets through the sheet rock and into the wood framing. This provides the most secure mounting.
If the places where you need to mount the curtain rod brackets is just a hollow wall area then you will have a bit bigger job of installing the brackets in a secure manner. The normal cheap wall anchors like below are really junk and not recommended. Instead use an anchor like that in the second picture.