The Nest Protect seems to have three self-testing mechanisms:
The Self Test, which runs every 200 seconds, and tests power, smoke/CO sensors and Wi-Fi
The monthly Sound Check, which verifies that the speaker, horn and light ring work as expected
The on-demand Safety Checkup, which tests all of the above components.
The automatic testing mechanisms cannot be disabled:
Self Test helps ensure that your Nest Protect is working to keep you safe, and gives you essential information when you need it, so it can't be disabled.
All of the test results are collected into the Nightly Promise, which verifies that there are no problems with your smoke/CO detectors before you sleep. If the Nest Protect glows yellow at night, this indicates a problem that requires attention (e.g. battery needs replacing, fault with sensors). You can view this in the app to see the exact problem.
The Nightly Promise automatically shows as soon as you dim the lights at night - no button is required for it to display.
In regards to answering how the detector self-tests, it's a little harder to say. Naturally, the detector can't just burn something to test if it's working or not, so I can only assume that the test procedure functions similarly to a normal smoke alarm.
The Nest Protect uses an optical detector, so it may be worth following the advice at How can I safely test my (optical) smoke alarm? on Home Improvement Stack Exchange if you want to test the device's reaction to actual smoke.