Sizeof is a much used operator in C and C++. It is a compile time unary operator which can be used to compute the size of its operand. The result of sizeof is of unsigned integral type which is usually denoted by size_t. sizeof can be applied to any data-type, including primitive types such as integer and floating-point types, pointer types, or compound datatypes such as Structure, union etc.
It's not a method, in C/C++, and it's not only used to determine the size of maps and arrays. That is of course assuming that you're talking about C/C++. A language tag would be helpful.