Origin 500 BCE to 400 BCE
The doctrine denies that there is a permanent, unchanging, independent self underlying a person. What is found on analysis is a set of processes, body, feeling, perception, formations, consciousness, each impermanent, none of them a self, and no self standing behind them.
It is important to state what this does not claim. It is not the claim that there is no person, no continuity, no agent and no moral responsibility; Buddhism affirms all of those and its ethics depends on them. What is denied is a particular metaphysical item: an unchanging essence that owns the experiences and persists unaltered through them. The teaching is an analysis of what a person is, not a denial that there are any.
This puts Buddhism in direct contradiction with the Hindu doctrine of atman, the self identical with ultimate reality, and the contradiction is not a matter of emphasis or terminology. It is the single sharpest doctrinal line between the two traditions, and both have known it and argued about it for over two millennia.
It was also contested inside Buddhism. Schools existed which held that there is a person, in some sense neither identical with the aggregates nor different from them, in order to account for continuity and memory. They were regarded as heterodox by the others and did not survive, but their existence shows that the difficulty was felt internally rather than only pressed from outside.
The Buddha's handling of the direct question is characteristic. Asked flatly whether there is a self, he is reported to have said nothing, and to have explained afterwards that answering yes would have sided with the eternalists and answering no would have sided with the annihilationists and confused a questioner who was not ready for either. The doctrine is presented as an instrument of analysis rather than a metaphysical thesis to be affirmed.