Service the brake cables on your bike if it is rubbing or not functioning properly.
Remove the cable from its casing, only if it is very stiff, or difficult to operate. This is done by removing the clamp at either the caliper or brake lever, and pulling it out the opposite end. If you remove the cable, use an aerosol solvent (or even WD-40) to flush any dirt or debris from the cable tube while the cable is out. Apply a light coat of lithium grease or machine oil to the cable, and reinstall it if it is not damaged.
Replace either the cable, or the complete cable assembly if the steps above did not solve the problem of the cable not moving when the brakes are applied. Buy the same diameter cable, factory fitted, in the same length as the original equipment. Making up the ferrels, cutting the cables to the correct length, and threading cables cut with pliers through the clamps is a difficult chore.