If the WiFi goes out, your smart doorbell will perform as a regular, traditional doorbell. The bell should still ring, but it won’t have access to the internet-based smart features; there's no more peeping who's at the door from your phone until you get WiFi again.
Purely electrical doorbells will not function in the event of a power outage. If you’re worried about losing power, look for a battery-powered doorbell. Even if you opt to hardwire your smart doorbell, many models offer backup battery power capability.