The MECHABER (RAV YOSEF KARO) wrote the Shulchan Aruch according to the majority opinion of the RIF, RAMBAM and ROSH. He discusses the same laws in each Siman (chapter) as the Tur, usually in the same order within the Siman as the Tur does. (The Tur did not divide each Siman into Se'ifim (subchapters). A modern printing of the Tur (Tur ha'Shalem) breaks each Siman into Halachos corresponding to the Halachos in the Shulchan Aruch.)
The REMA wrote Hagahos (comments) on the Shulchan Aruch. He drew from Tosfos and other sources. Sefardic communities generally follow the Mechaber (and the customs he cites are generally of Sefardim), whereas the REMA is followed by and cites customs of Ashkenazic communities. The REMA also wrote Darchei Moshe, a commentary on the Tur.
RAV YOSEF KARO also wrote the Kesef Mishneh and Beis Yosef, commentaries on the RAMBAM and Tur, respectively.