AST

There are currently two iterations of Apple Service Toolkit (AST).

AST 1 (1.5)
The first generation of the Apple Service Toolkit used a Mac-based Netboot configuration to deploy diagnostic images in order to determine if Macs (iMacs and MacBooks) had any hardware or evaluation issues based on unexpected values reported from a device using the device's System Management Controller, which reports everything from temperature sensors to hardware IDs to different components in Macs.

AST 2
The second generation of the Apple Service Toolkit uses a cloud-based configuration to start up and report diagnostics for Apple Service Technicians. While Macs can still use a Netboot server to provide diagnostics for devices, AST 2 makes a shift to being a cloud-based service which also allows iOS, watchOS, and tvOS devices to also be diagnosed remotely. Diagnostics.app is made to connect to a server and issue different diagnostic images in order to troubleshoot devices based off of a web client named Diagnostic Console (DC).

How to access diagnostics mode (on device)
There are a few different ways to access diagnostics depending on the device.

On iOS, once diagnostics are queued up through AST2, you will see a message available under Settings > Privacy & Security > Analytics & Improvements listed as "Start Diagnostics with Apple Support". You can also launch the same diagnostics screen using  in Safari, or by booting to CheckerBoard.

On an Apple Silicon Mac, diagnostics can be launched by holding the power button on the Mac until "Loading Startup Options..." is presented then release the power button. By pressing and holding command - D, the device will boot to the diagnostics environment.

On an Intel Mac, diagnostics can be launched by pressing - and releasing - the power button and immediately holding down the D key. To boot to internet diagnosics, hold down Option - D at startup.