To choose not to be part of an activity or to stop being involved in it: Within any society, there will usually be people who decide to opt out (= choose not to live the way most people do). Employees can choose to opt out of the 401K plan.
For example, your welcome message may include “Reply STOP to unsubscribe.” Once the customer replies with the opt-out keyword, businesses typically send a reply that confirms the customer won't receive further promotional text messages.