A lot of people use these terms interchangeably and they really shouldn't. And those that use them indiscremently are making a mistake they may regret. That's because they are not the same and they don't do the same thing. As the name implies, deodorants neutralize or mask body odours. That's in contrast to antiperspirants which block or inhibit the production of sweat.
Nor surprising, these products are formulated differently. Deodorants contain antibacterial acids and salts. Some will also contain fragrances or perfumes to help mask odours. We have been using deodorants since the times of the ancient Egyptians. They used to rub cinnamon and citrus oils to their underarms. Before effective soaps became available the ancient Greeks and Romans used a small curved metal tool called a strigil to scrape excess sweat and dirt from the skin's surface.
Antiperspirants have a much shorter history, dating back to the late 1800's. A better understanding of the physiology and mechanism of perspiration has given rise to very effective antiperspirants. A topical antiperspirant typically will be absorbed just beneath the surface of the skin and will find its way to the sweat glands. In turn, the sweat ducts will get plugged and this will stem the flow of sweat to the surface of the skin.