What's the difference between GetComponent and GetComponent(StringName)?

Can the type be different from the string name?
Can it be set manually?

The generic form of the method is faster. The generic form is also type safe (it will throw a compiler error if the type does not exist).

The string form is slower. It is not type safe (errors will occur at run time).

The general preference should always be to use the generic form. There are some cases where the flexibility of the string form is required. (Say you need to store a bunch of strings in a file).