If you are carrying out certain activities involving personal data (e.g. online marketing), you have to ask consent from the persons.
Consent has to be asked clearly and explicitly. It has to be separate from all other text, it needs to be clear, freely given and specific, so that the person would know, to what they are giving it. Pre-ticked boxes, silence or inactivity is not considered as consent by GDPR; therefore, companies need to ask a direct and formal consent.
Also, persons have the right to withdraw their consent (opt out) at any time they like. You have to make it as easy as possible to do so.