Curtains frame your windows, obviously. You should always place the rod above the window, and that means at any height and not glued to the top of your window. Ideally, you could hang the rod almost halfway (or more) between your window and the ceiling for optimal height.
As for the length, you can mess around with how long your curtains drape. But don't limit your curtains to the length of your window — you can hang curtains that just graze the floor or even pool on the floor!
You also wanna hang your curtains wider than your window, so the curtains don't end exactly where your window frame does — it'll make your room look bigger! Basically, you'll wanna be able to see most of the window when your curtains are open — not have them bunched up in front of it.
For more curtain tips, check out Wayfair's Ultimate Guide to Window Treatments and their Curtain Style Guide!