In your example Foo is an template class. It might look like that:
1 2 3 4 5
template <typename T>
class Foo
{
T member;
};
When you instantiate it with concrete type, like Foo<string>, it will create a class where all entries of T will be replaced with that type. So deep inside the compler it would create class like:
1 2 3 4
class Foo@string /*name mangling so Foo<string> and Foo<int> would be different classes*/
{
string member;
};