Learning how to install a doorbell is really easy. You can install the wiring if you're just building a house, but if you need to install a doorbell system in an existing house, you might consider installing a wireless doorbell.
These instructions will be for a new home with the walls still exposed so you can get at the electrical wiring.
As in the diagram below, you will use doorbell wire from the doorbell chime to the doorbell. This can be bought at Home Depot or any hardware store. It is about a 22-gauge wire which is really small. Be sure to secure the wires so they aren't vulnerable to vibration because they will wear through quickly.
You will use normal Romex 12-2 cable right up to the transformer. It can be a part of a light and outlet circuit. Just connect the white Romex wire to the white doorbell transformer wire. Connect the black Romex wire to the black transformer wire.
The doorbell transformer can be installed in an electrical box just like an outlet or a light switch. It is an easy installation and most transformers are small. If by chance, your particular doorbell transformer is bigger than a single electrical box, you can use a double or triple box.
The transformer wires will connect to the chime box wiring. Doorbells need a transformer because the voltage needed to activate them is only around 12-volts. A transformer reduces the 120-volt house voltage to 12-volts or whatever voltage the doorbell uses.
Doorbell wire will usually be red and black, but not always. Pressing on the doorbell completes the electric circuit and activates the chime.