The power profile.
When you plug in the power cord, your laptop will typically switch to 'high Power' mode, enabling the full speed of all components. at the cost of a large increase in power consumption.
While you are un-plugged your laptop will switch to a 'Balanced' or 'Power Saving' mode, where the CPU and GPU will typically be slowed down and have its performance limited, other parts like the HDD and WiFi will also be turned off when idle to preserve power, and a few other minor tweaks to the system occur.
You can force any power plan to run at any time, simply by clicking the power/charging icon in the bottom right or your task-bar.
Keep in mind, using 'High Power' mode while un-plugged will drain the battery at a very fast...