Can I say var is a type, or do I have to say var is a keyword that instructs the compiler to determine the type?
It depends on how you look at it. Seriously!
The C# compiler does three kinds of analysis on programs, each subsequent analysis consuming the result of the previous one. The first kind of analysis we do is lexical analysis; we take the text and turn it into a series of tokens. Suppose you have
class C { static void Main(){ var x = 123; } }
We first determine that those tokens are CLASS IDENTIFIER(C) LEFTBRACE STATIC VOID IDENTIFIER(Main) LEFTPAREN RIGHTPAREN LEFTBRACE IDENTIFIERTHATMIGHTBEAKEYWORD(var) IDENTIFIER(x) EQUALS INTEGER(123) SEMICOLON RIGHTBRACE RIGHTBRACE.
At this stage of analysis, "var" is an identifier with a note on it that says that it might be the keyword var, not the identifier var.
The next analysis we do is a grammatical analysis where the tokens are organized into groups that form a "parse tree". In this case the tokens would be organized into this tree (indentation indicates nesting level in the tree)
declaration of class: CLASS
class name: IDENTIFIER(C)
class body begins: LEFTBRACE
declaration of method:
method modifier: STATIC
return type: VOID
method name: IDENTIFIER(Main)
formal parameter declarations:
formal parameter declarations begin: LEFTPAREN
formal parameter declarations end: RIGHTPAREN
method body:
method body begins: LEFTBRACE
local declaration statement:
type: IDENTIFIERTHATMIGHTBEAKEYWORD(var)
local name: IDENTIFIER(x)
initializer:
assignment operator: EQUALS
integer literal expression: INTEGER(123)
statement ends: SEMICOLON
method body ends: RIGHTBRACE
class body ends: RIGHTBRACE
At this point var has been classified as a type, grammatically. It it in the place we would expect a type declaration if this is a grammatically legal program.
But at this point we do not know whether "var" refers to a type or is being used as a keyword. That requires semantic analysis.
When we do the semantic analysis of the parse tree we say "OK, there's a class C, it's got a method Main, which declares a local variable x. What is the type of that local variable?"
At this point there are two possibilities. The first possibility is that there is a class, struct, enum, interface or delegate type named "var" in the global namespace. (There are no "using" directives in this program fragment so we don't have to check any other namespaces, and the type is not partial so we don't have to check any other type declarations). We search the global namespace of all the referenced assemblies looking for a type called "var". We also do semantic analysis of the type declarations in all other files, again, looking for a type called var.
If we find one, then "var" refers to that type.
If we don't find one then we assume that "var" is being used as a contextual keyword that introduces an implicitly typed local.
So, to answer your question:
Lexically, the code fragment "var" is an identifier token with a note on it that says "by the way, this might actually be a keyword".
Grammatically, the token "var" is a type when it appears at a position in the grammar where a type is expected.
Semantically, the type syntax "var" is a type when there is a type in scope called var; if there is no such type and "var" is being used as the type of a local declaration then the type syntax "var" does not refer to a type. Rather, it is an instruction to the compiler to infer the actual type of the local.