A cohort study and a longitudinal study are related but not identical concepts — the key difference is that "longitudinal" describes the timing/structure of data collection, while "cohort" describes who is being studied.
Longitudinal study: This is a broad research design category defined by the fact that the same subjects are observed or measured repeatedly over an extended period of time (months, years, or even decades). The defining feature is repeated measurement over time on the same individuals, which allows researchers to track changes, development, and trends within those subjects. Longitudinal studies can look at any group of people — a single individual, a random sample, a specific age group, or a broader population — and are contrasted with cross-sectional studies, which measure different subjects at a single point in time.
Cohort study: This is a specific type of longitudinal study in which the subjects share a defining characteristic or experience within a specified time period — for example, being born in the same year (a birth cohort), starting the same job, being exposed to the same medical treatment, or living through the same historical event. Cohort studies are especially common in epidemiology and medicine, where researchers follow a group with a shared exposure (like smokers vs. non-smokers) forward in time to see who develops a particular outcome (like a disease). Cohort studies can be prospective (following people forward from now) or retrospective (using historical records to reconstruct exposure and outcome data).
In short: every cohort study is a longitudinal study, but not every longitudinal study is a cohort study. A longitudinal study becomes a "cohort study" specifically when the group being tracked is defined by a shared starting characteristic or exposure rather than being just any set of repeatedly measured individuals. Some longitudinal studies (like panel studies of a random population sample) aren't organized around a shared exposure and thus aren't typically labeled cohort studies, even though they share the repeated-measurement design.