Some airlines now restrict or even forbid the use of cameras on commercial flights although others either allow aerial photography or choose to ignore the rules. It seems a harmless activity to an innocent photographer but understandable sensitivity exists in all aspects of aircraft security.
The first requirement on a modern jet airliner is to get a window seat that has a relatively unobstructed view - obviously not over the wing. The front half of an airliner tends to offer a little less motion than the rear sections. The next essential is to have a clean window but this is only partly in the passengers control. If the window is dirty on the outside there is nothing one can do except change seats with another passenger. If the inside window is soiled, clean it with a handkerchief or whatever might be available.
The windows of airliners consist of an inner plexiglass window, which is easily scratched, and an outer window which is an integral part of the pressurized passenger cabin. The two windows may be some distance apart, and the inner window is usually much larger than the outer window. The outer window is usually made of two layers of acrylic to provide thermal insulation and the clearest possible view. The outer pane protects passengers from the very low temperatures at high altitudes, and the inner pane prevents humidity from freezing and obscuring the view.
Taking photographs through the multiple layers of a window is far from ideal but in an airliner there is no other option. Place the lens of the camera very close to the inner surface without actually touching it. This reduces reflections from the inside of the aircraft and maximizes the field of view. Do not use a polarizing filter as this is likely to produce a rainbow of colours across the middle of the image. Also, try to shoot when no direct sunlight is striking the window.