This is the 411th most frequent Hungarian word.
károly
"Károly" is a Hungarian male given name, equivalent to "Charles" in English.
Here, 'Károly' is used as a proper noun to indicate a person's name.
Károly nagyon ügyes szakács.
Károly is a very skilled cook.
In this sentence, 'károlyi' modifies 'várat', demonstrating the adjective form derived from the name 'Károly'.
A károlyi várat meg kell látogatnunk.
We must visit the Károly castle.
'károly' here is the simple mention of the person's name, used in attributive form.