[verb (dictionary form)] + のが好き
The structure のが好き is used to express that someone likes doing something. The particle の nominalizes the verb – it turns the verb phrase into a noun-like phrase meaning "the act of doing ~." The particle が then marks this nominalized phrase as the subject of すき好き (like/fond of).
Use the dictionary form of a verb before のが好き.
To say you don't like doing something, negate 好き by using 好きじゃない (casual) or 好きではありません (polite).
You can modify the degree with words like だいすき大好き (love) or あまり (not really).
You can use this pattern in questions to ask what someone likes doing.
Both の and こと can nominalize verbs, and in this pattern they are largely interchangeable. However, の is more common in spoken Japanese and feels more natural in everyday conversation, while こと is slightly more formal or written in tone.