Nearly all of the drywall in your home is attached to framing studs. If your house was competently framed, these walls remain flat and smooth and resist cracking. Above your windows, the drywall may be attached to a header, a sandwich of plywood between two 2 x 10s that provides stability above window openings. The problem is that headers expand and contract due to heat and moisture much more than framing studs. The result is that cracks form in the drywall above the corners of windows.
Ideally the shape of your windows have been cut out of the drywall, as opposed to having the edge of a piece of drywall butting against the edge of the window, and a separate piece installed over the top of the window. If the cracks above your windows radiate out from the corners, then you probably have a single piece of drywall covering the top and side of the window's upper corner. In this case the repair is a little simpler. Cracks running vertically from the corner of the window extending nearly to the ceiling indicate separate pieces of drywall and require a bit more work to fix.
The basic steps for repairing both types of cracks are the same--in both cases you begin by using a utility knife to cut the crack into a V-shaped notch. The difference is, if you have a vertical crack between separate pieces of drywall, you want to make this notch wider, about 1/3 of an inch wide. Cut all the way to the wall plate or about an inch-and-a-half below the ceiling, even if the crack doesn't extend this far. This provides greater flexibility between the two pieces of drywall, which prevents future cracks as the piece of drywall over the door gets pushed and pulled by the header.
Remove any loose drywall material and apply joint compound with a putty knife to a depth of 1/8 inch over the crack. Press drywall tape into the compound (pre-moisten the tape if using paper tape), then drag your putty knife lightly over the compound. If the tape becomes exposed, you dragged too hard. Pull it out, reapply joint compound, and try again.
When the joint compound is dry, sand lightly, and add a second coat of compound using a wider putty knife (at least 6 inches). Your goal is to feather it out from the repair so that the tape stays covered but the wall appears smooth and flat. Again let the joint compound dry, sand, then use an even wider putty knife to apply a third coat.