A condition where the attacker requires local access in order to trigger the vulnerability by executing a piece of code is known as a local vulnerability. By taking advantage of this type of vulnerability, an attacker can increase their access privileges to gain unrestricted access to the computer.
Let's take an example in which Bob has local access to a system running MS Windows Server 2008 (32-bit, x86 platform). His access has been restricted by the administrator through the implementation of a security policy, which will not allow him to run the specific application. Under extreme conditions, he found out that by using a malicious piece of code, he could gain system-level or kernel-level access to the computer. By exploiting a well known vulnerability (for example, CVE-2013-0232, GP Trap Handler nt!KiTrap0D), he gained escalated privileges that allowed him to perform all the administrative tasks and gain unrestricted access to the application. This shows us clearly how the malicious adversary exploited the vulnerability to gain unauthorized access to the system.