A doorbell has three parts—the switch, the bell, and a transformer between them. If you don't hear anything when you press the button, check the switch's wire connections (no worries the voltage is too low to hurt you). Try touching the two wires together; if the bell rings, then you need to replace the switch. If the chime doesn't ring or makes a funny noise, check the bell. Clean it, inspect the wiring, and make sure the hammer isn't bent away from the bell or jammed by dirt. If you still don't hear that welcoming ring-a-ling, then it's likely the transformer is the problem. To fix that, you'll need an electrician.
Get the step-by-step at How to Fix a Doorbell