Inspect the ceiling; you may find that an old ceiling box was covered. If so, use existing wiring. But first have the wiring checked by an electrician; it may need replacing.
Caution: Before working on wiring, turn off the power to the circuit you are working on.
If you must add wiring, the easiest installation is a metal raceway running from a wall outlet to the point where the ceiling fixture will hang. Because a raceway is visible, it isn’t suitable for every room. Some local codes regulate its installation; check with your municipality’s building department.
Locate joists: look for nails holding the plasterboard to the joists or use a stud finder. Put on goggles and drill a 3/8-inch hole between joists where you want a fixture to hang. Draw a 6-inch square around the hole; cut out the square with a keyhole saw. Extend a tape measure into the opening and measure between one edge of the opening and the nearest joist. Add 1 inch to this dimension and mark that distance on the ceiling. Repeat, measuring from the opposite edge of the opening.
Using your marks as guides, draw a square around the opening. With a straight edge and a utility knife, cut along the lines drawn, then cut the square into four truncated triangles. Wearing goggles, hammer the triangles from the ceiling. Cut away the inner layer of paper holding the plaster fragments. Using a brick chisel and ball-been hammer, cut away plasterboard on the joist sides of the hole.
On new plasterboard measure and cut a square 1/8 inch narrower than the opening. Center the ceiling box on this square and trace its outline. Cut along these lines, then cut the outline in half. Resting the outline on four pieces of wood, knock out the halved form with a hammer and a block of wood, then trim the rim. Run wiring to the box or call in an electrician.
Attach the box to an adjustable bar hanger. Nail the hanger to the joists, making the box flush with the replacement board. Support the plasterboard square, dark side up, with your forearm as you nail its corners to the joists. Nail the joist sides fast with nails spaced several inches apart. To fill and tape cracks, see Plasterboard. Plaster-and-lath ceilings Tap the ceiling with a cloth-wrapped hammer to locate two neighboring joists, then mark a spot midway for the fixture. Chisel away plaster at that point to expose a lath. Chisel a path along the lath, from one joist to the other, then trace the outline of the box where the fixture is to hang. Drill a 3/8inch hole in the center of the outline; cut out the outline with a keyhole saw while supporting the outer rim with your hand. The inner edges of the joists should be visible.
Saw the exposed lath from the joists and remove lath nails. Screw the box to an offset hanger. Place the hanger into the ceiling groove and adjust the Cable Ceiling box to fit the hole. Wire the box. Screw the hanger to the joists. Fill the channels with patching plaster; after it has dried, apply spackling compound. Sand smooth, then paint.