Welcome Confusedstudent:
This question has been addressed before, but the basic answer to your question is PanAfricanism & the Back-to-Africa movement are NOT the same thing. However in many ways they are related.
Pan Africanism is an idea. Pan Africanism grew out of 19th century efforts to end slavery and the slave trade. At this time blacks worldwide were being oppressed. Slavery existed in America, South America, and the Carribean. Also the colonization of Africa (born out of the Berlin Conference of 1884 & 85) had begun. As a result of these events black people world wide began to realize that they faced common problems (slavery, colonization, and racism), and that it would be to their benefit to work together in an effort to solve these problems. Out of this realization came the Pan African Conferences of 1900 (London), 1919 (Paris), 1921 (London, Brussels, Paris), 1923 (London), 1927 (New York), and the last official one was in 1949. Some of the most influential blacks of the time participated in these meetings: Slyvester Williams, W.E.B. Du Bois, Marcus Garvey, Kwame Nkrumah, etc. The belief that people of African descent throughout the Diaspora (meaning spread throughout the world) share a common history, culture, and experience and should stick together. This belief is the principle idea behind Panafricanism. Bringing black people throughout the world together because of our common culture. Panafricanism can be expressed through history, literature, music, art, film, clothing, and food.
The Back to Africa movement was inspired by Marcus Garvey. It was a logical growth from the PanAfricanist thought of the day. Garvey felt that Africans in the Diaspora should form their own companies, and return to their ancestorial homeland. In reality the notion of African-Americans returning to Africa had been discussed before, as the American Colonization Society promoted this idea in the 1800s. The difference between the two ideas was that the American Colonization Society was mostly white inspired, and the purpose was to get rid of the "problem" of black slaves by sending them back to where they came from. The Back to Africa movement was black inspired, and it sought "reunite" African Americans with the homeland they were forcefully taken from. The BTAM called on African Americans to use their gifts to help Africa. Although few blacks ever returned to Africa under the BTAM, the movement did create a new sense of pride about Africa among its American children.