Coronavirus disease 2019 (CoViD-19), with the fatality rate in elder (60 years old or more) being much higher than young (60 years old or less) patients, was declared a pandemic by the World Health Organization on March 11, 2020. A mathematical model considering young and elder subpopulations under different fatality rates was formulated based on the natural history of CoViD-19 to study the transmission of the severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2). The model considered susceptible, exposed, asymptomatic, pre-symptomatic, mild CoViD-19, severe CoViD-19, and recovered compartments, besides compartments of isolated individuals and those who were caught by test. This model was applied to study the epidemiological scenario resulting from the adoption of quarantine (isolation or lockdown) in many countries to control the rapid propagation of CoViD-19. We chose as examples the isolation adopted in São Paulo State (Brazil) in the early phase but not at the beginning of the epidemic, and the lockdown implemented in Spain when the number of severe CoViD-19 cases was increasing rapidly. Based on the data collected from São Paulo State and Spain, the model parameters were evaluated, and we obtained a higher estimation for the basic reproduction number R.sub.0 (9.24 for São Paulo State, and 8 for Spain) compared to the currently accepted estimation of R.sub.0 around 2 using the SEIR (susceptible, exposed, infectious, and recovered compartments) model. In comparison with the lockdown in Spain, the relatively early adoption of the isolation in São Paulo State resulted in enlarging the period of the first wave of the epidemic and delaying its peak. The model allowed to explain the flattening of the epidemic curves by quarantine when associated with the protective measures (face mask, washing hands with alcohol and gel, and social distancing) adopted by the population. The description of the epidemic under quarantine and protections can be a background to foreseen the epidemiological scenarios from the release strategies, which can help guide public health policies by decision-makers.