Research Study of How Well Semaglutide Works in People Living With Overweight or Obesity.

This study will look at the change in body weight from the start to the end of the study. The purpose of the study is to compare the effect on body weight in people taking semaglutide (a new medicine) and people taking "dummy" medicine. In addition to taking the medicine participants will have talks with study staff about healthy food choices, how to be more physically active and what else they can do to lose weight. Participants will either get semaglutide or "dummy medicine" - which treatment is decided by chance. Participants will need to take 1 injection once a week. The study medicine is injected with a thin needle in a skinfold in the stomach, thigh or upper arm.• The study will last for about 1 year. Participants will have 11 clinic visits and 8 phone calls with the study doctor. Participants will have 3 clinic visits where they cannot eat and drink (water is allowed) for up to 8 hours before the visit and 1 clinic visit where they cannot eat and drink for up to 2 hours before the visit. (4 visits and 1 visit, respectively, if they have type 2 diabetes (T2D)). Participants will have 4 clinic visits where they will have blood samples taken. (5 visits if they have T2D). For China: Participants will have 9 clinic visits where they will have blood samples taken. Women cannot take part if pregnant, breast-feeding or planning to become pregnant during the study period.


Eligibility Criteria:
Inclusion Criteria:

* Male or female, age 18 years or older at the time of signing informed consent
* History of at least one self-reported unsuccessful dietary effort to lose body weight

For subjects without T2D at screening:

* Body mass index (BMI) of :
* greater than or equal to 30 kg/m\^2
* greater than or equal to 27 kg/m\^2 with the presence of at least one of the following weight-related comorbidities (treated or untreated): hypertension, dyslipidaemia, obstructive sleep apnoea or cardiovascular disease

For subjects with T2D at screening:

* Diagnosed with T2D above or equal to 180 days prior to the day of screening
* Treated with either:
* diet and exercise alone or
* stable treatment (same drug(s), dose and dosing frequency) for at least 60 days prior to the day of screening with up to 3 oral antidiabetic medications alone or in any combination (metformin, α-glucosidase inhibitor (AGI), SU, glinides, SGLT2i or glitazone) according to local label
* HbA1c 7.0-10.0% (53-86 mmol/mol) (both inclusive)
* BMI greater than or equal to 27 kg/m\^2

Exclusion Criteria:

* A self-reported change in body weight above 5 kg (11 lbs) within 90 days before screening irrespective of medical records

For subjects without T2D at screening:

- HbA1c equal to or above 6.5% (48 mmol/mol) as measured by the central laboratory at screening

For subjects with T2D at screening :

* Renal impairment measured as estimated Glomerular Filtration Rate (eGFR) value of below 30 mL/min/1.73 m\^2 (below 60 mL/min/1.73 m\^2 in subjects treated with SGLT2i) according to CKDEPI creatinine equation as defined by KDIGO 2012 by the central laboratory at screening
* Uncontrolled and potentially unstable diabetic retinopathy or maculopathy. Verified by a fundus examination performed within the past 90 days prior to screening or in the period between screening and randomisation. Pharmacological pupil-dilation is a requirement unless using a digital fundus photography camera specified for non-dilated examination.