First switch off the power. Remove fixture from ceiling. While removing please notedown which wire are connected to which. Remove the fasteners that fix socket to fixture. Install new socket on fixture. Finally install fixture to ceiling. Always use pliers to twist the ends of the wires together. Always use a stool or ladder.
First turn it off the circuit to the light. Then remove the old socket. Install the new socket, before fastening it firmly, turn the circuit back on and put in a bulb test it. Now, finish the installation of the new socket.