Gestalt was the name of a system call introduced into the Apple Macintosh operating system System Software 6.0.4 in 1989 to allow applications to dynamically query what capabilities were present in the running system configuration. In Computing, a system call is the mechanism used by an application program to request service from the Kernel. Macintosh, commonly nicknamed Mac is a Brand name which covers several lines of Personal computers designed developed and marketed by Apple Inc An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination System 6 (also referred to as System Software 6) is a Graphical user interface -based Operating system for Macintosh computers 
By this time, the pace of Mac development had produced such a proliferation of hardware configurations and hardware and software add-ons from Apple and third parties that a simple version check was no longer enough to determine the features of the system. Instead, Gestalt maintains a dynamically-extensible table of OSType selector codes. OSType (also known as FourCC or ResType) is the name of a four-byte sequence commonly used as an identifier in Mac OS.
For instance, instead of checking the system version to deduce what version of the Sound Manager might be present, there is a separate Gestalt selector for directly querying the capabilities of the Sound Manager. The Sound Manager is a part of the classic Apple Macintosh Operating system, in Mac OS. Thus, it could be made possible for an application dependent on capabilities introduced in a newer Sound Manager to run on an older system which had the updated Sound Manager installed as an add-on, as well as on a newer system which had the new Sound Manager built-in. Application software is a subclass of Computer software that employs the capabilities of a computer directly and thoroughly to a task that the user wishes to perform And of course the Sound Manager add-on could also query this Gestalt selector first to decide whether there was any point in installing itself into the current system.
The value returned by querying a selector code is 32 bits, whose meaning depends on the selector. A bit is a binary digit, taking a value of either 0 or 1 Binary digits are a basic unit of Information storage and communication Some selectors define this as a version code, while others use it as a bit mask of available capabilities. Some subsystems define both types of selectors, allowing querying of both the version number and the capabilities. Some even use a Gestalt selector to pass the address of a shared block of data, or even the address of code that could be called. Since the piece of code that installed a Gestalt selector could either install a simple static value or a callback that Gestalt would invoke every time somebody queried the selector, it was possible for the value returned to vary dynamically from call to call, to reflect information about the current state of the subsystem. In Computer programming, a callback is Executable code that is passed as an argument to other code
The Macintosh Programmer's Workshop also provided a tool named Gestalt which allowed the developer to test for various features using the command line. Macintosh Programmer's Workshop or MPW, is a software development environment for the Classic Mac OS, written by Apple Computer.