Hit Rate measures the share of users or query that get at least one relevant recommendation.
Hit Rate at K calculates the share of users for which at least one relevant item is present in the K.
It's usually a binary metric where the query is either contains a relevant recommendation or not. You can get a binary score for each user or query: “1” if there is at least a single relevant item in top K or “0” otherwise. Then, you can compute the average hit rate across all users or queries.