There are several ways concrete can become damaged. Repairing the concrete is preferable to replacing it not only for the cost factor, but for the inconvenience of having your sidewalk, driveway or garage or basement floor dug up and replaced as well. Repairing concrete is not a difficult operation. And it does not take any expensive equipment. Everything is readily available at your local hardware store or home improvement center. Just follow the specific instructions for each type of repair. Always remember safety first. Wear safety goggles and work gloves.
Getting to the repair when it is a hairline crack is much more preferable than waiting until it grows. You do not want moisture getting in and under the cement. Mix Portland cement with water until it makes a thick paste.
Moisten the crack with water and keep it moist, but not wet, for several hours before using the grout. If the cement gets too dry, it will take moisture from the grout and the grout will not stick. Use a putty knife or pointing trowel and force as much of the grout into the crack as you can. Make sure the patch is even with the concrete and leave it alone for about two hours. Once it is dry, cover it with a board or heavy plastic held down by rocks. If the patch is on a sidewalk, make sure to block it off so no one can trip and fall over the board. Leave it like this for five days and once a day sprinkle the patch with water.
For larger cracks, it is a bit more complicated. First of all you need to enlarge the crack even more. Go along the entire length of the crack with a cold chisel and hammer, making the crack wider at the bottom than it is on the top so it resembles an upside down V. Remove all of the loose material and then go over the sides of the crack with a wire brush. Wash out the crack with a garden hose. Brush the walls of the crack with a concrete adhesive and leave it alone until it becomes tacky. Fill the crack with a pre-mix concrete patch and smooth out the surface with a trowel when it begins to set. Cover and water for five days like above. For repairing cracks in driveways, follow the same procedure except use one part Portland cement, two parts sand and three parts gravel and make the crack wider than you would if it were on the sidewalk and do not drive a car over the patch for five days.