To learn more about DNS server, there are 3 DNS server examples included with the board package. In the IDE see File -> Examples -> DNSServer.
I do not think in softAP mode, the ESP8266 can connect to the Internet. It would have to act as STA and AP at the same time which is not possible. But I would love to hear I am wrong.
WiFi Manager use captive portal mode to configure the SSID and password, then reboot into normal mode to access the Internet. If WM cannot access the AP (SSID and password wrong or the device has moved too far from the AP), it goes back to captive mode so the user can enter a different SSID and password.