Political ideologies such as democracy, socialism, and fascism have flexible definitions that can depend on the government you are describing, the point in history, and the person who is explaining the term, among many other variables. For example, the type of socialism that was practiced in the Soviet Union in the 1950s is different than the current platform of the Socialist Party in France.
Carnegie Council for Ethics in International Affairs has created a primer found in the attachment that explains how socialism, capitalism, and social democracies are related.