Windows are associated to walls according to their anchor point. Either by their sill or their header. Then if the Opening Plane is set to 'Associated to Wall' they will appear parallel to the opening reference line as set in the Complex Profile dialog. If you use a curve as an opening reference line, it will be tangential to that curve.
There are two opening reference lines so that you may have a different opening reference for each side of the wall. When you place a window or door into the wall, it depends on which side of the wall you place it as to how it will behave.
Keep in mind that opening lines do not have to be on the edge of the wall profile, if you want to center your window or door a little (or even take them outside the boundary of the wall). Neither do they have to join, so in fact you can have as many opening references as you like.
Cheers,
Link.