The goal of exploitation is to simply make a computer system do something you want it to do, but it is not supposed to do. This really could mean anything, but there are a number of common ways for this to be interpreted. When attacking a remote system, most often it is desired to be able to run code on it. The code may be running as a non privileged user, but anything is a start. Attacking a system when you have the ability to run code on it, or locally, usually implies that the attacker wants to have more control over the system.