First talk with any of your older relatives who are still alive. Ask them questions about their families and grandparents.
Begin your online search at Ancestry. Start with yourself and work backward one generation at a time. Useful records to collect include birth, death, and marriage certificates, obituaries, cemetery records, probate and land records, newspaper announcements, and military records.
A large part of your research will include federal and state censuses. Start at the 1940 Federal Census, which is the most recent available.
For enslaved ancestors, the 1870 Federal Census is especially important because it is the first census taken after the Civil War and names all persons in a household. For free ancestors, the 1850 federal census is the first census to name all persons in a household.
Searching in pre-1870 records for your ancestors will have to be built on researching other documents as the censuses will only list slaves by age. Seek out marriage settlements, probate distributions, and court records, also if you know about where your ancestor was enslaved, search out plantation records in the state your ancestor was born.
Photo source: Du Bois, W. E. B. (1899) African American family posed for portrait seated on lawn. Georgia, 1899. [or 1900] [Photograph] Retrieved from the Library of Congress, https://www.loc.gov/item/99472441/.