Reb Shneur Zalman was the founder of Chabad Chassidus, and learned about Hasidism from Rabbi Dov Baer HaMaggid, leader of the Hasidic movement. Under The Maggid, Reb Shneur Zalman wrote updated and profound commentaries about the Shulchan Aruch.
When the anti-Chassidic movement was taking place in the mid-18th century, Reb Shneur Zalman went to Vilna and attempted to speak to the Gaon of Vilna to try to reach some kind of understanding between Chassidim and Misnagdim. Reb Shneur Zalman later published the Tanya, which was accepted as the written law of Chabad Chassidus. His ability to explain even the most complex issues of Torah made his writings popular with Torah scholars everywhere. Reb Zalman had a vast knowledge of mathematics and science as well. His son, Rabbi Dov Baer, became the leader of the Chassidic movement after Reb Shneur Zalmans death.
Source: Orthodox Union