Keys
Keys[<|key1->val1,key2->val2,…|>] gives a list of the keys keyi in an association.
Keys[{key1->val1,key2->val2,…}] gives a list of the keyi in a list of rules.
Keys[expr,h] gives a list of keys in expr, wrapping each of them with head h before evaluation.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.