I know that よく means 'often' or 'well', but what is the meaning of it when it is used before わからない? Does it mean 'I often don't understand', or does it mean 'I don't really know'?
The meaning of よく here is "well". よくわかる means to understand something well, or thoroughly. In contrast, よくわからない in speech would indeed be "I don't really know" or "I'm not sure". Here's a helpful link for understanding how to use this in various contexts.
It's worth mentioning that even though it technically means "I don't understand (it) thoroughly", which may give off the impression that the subject does understand the topic on a basic level, many may turn to this expression even when they're totally clueless about a topic e.g. すみません、よくわかりません。
You may also come across よくわかっていない, which is usable in a more academic or report-type context, when something is not well understood in general. e.g. この病の原因はまだよくわかっていない ("the cause of this disease is still largely unknown").
Finally, if you want to strictly say "I don't understand (something) often", you would say something like 分からない(事/ところ/時)がよくある, which can be replaced by よくわからない in most contexts anyway because it makes sense that you would not understand something often when you don't understand something thoroughly.