Hey there! So most of the time it will stay in the keto form since it is the most stable but there are times when an enol form is favorable. The 2 most common situations are when it can make the molecule aromatic or when hydrogen bonding makes the enol form a bit more stable. Illustrations are shown below. I hope this helps!