The Pekalongan Batik Museum is the right first stop in the city. It covers batik motifs from across Indonesia and puts Pekalongan's own coastal style in context: brighter, more outward-looking and shaped by trade through the Java Sea.
Look for demonstrations or short workshops if they are running. Even a basic try at wax-resist drawing makes the difference between hand-drawn batik and printed cloth much clearer when you shop later.