How do laser-guided bombs know which laser dot to go for?

If there’s just one laser dot then the bomb would go for that dot, but what if several clustered targets are being “painted” by lasers simultaneously?
And for sheer absurd hypothetical’s sake, could an enemy who just so happened to have a laser of his own (of the same invisible wavelength) then fool the bomb by shining a much more powerful laser onto a nearby, uninhabited place several hundred yards away instead?

It’s not a dot. It’s a pattern.

In what way? Does it have a frequency that varies?

As Loach says and from Wiki - LASER Designator
“When a target is marked by a designator, the beam is invisible and does not shine continuously. Instead, a series of coded pulses of laser-light are fired. These signals bounce off the target into the sky, where they are detected by the seeker on the laser guided munition, which steers itself towards the centre of the reflected signal.”

There is matching of the designator codes to the bomb/missile guidance system. User settable at both ends.

Chapter 4 of this document talks more about the system, specifically a “pulse repetition frequency” code.

I am not sure, but I imagine it to be similar to the way your TV remote blinks a certain pattern (kinda like morse code) for different commands.

In some airplanes, such as the F-15E, with certain bombs, the guy in the back seat can (or at least could circa Desert Storm) fly the bomb into the target with a joystick and a video screen, or control a target designator for a variety of bombs/missiles.

You have your dumb bombs/rockets, then on to guidance; inertial guided ones, inertial plus GPS, laser guided, TV guided, wire guided, beam riding, fire and forget IR guided, fire and forget millimeter wave radar guided, ones that track on sound, metal mass sensing one - I’m missing some but it’s late.

Yep. A pulse pattern. One bomb might be set to look for “10101111” and the other set to look for “11010011”, etc.

Now, if the pattern is a simple repeating pattern, where it just repeats the same binary pattern over and over, you could build a countermeasure device that shined a stronger version of that pattern on something else. For various reasons this countermeasure would be hard to use.

It’s possible the actual laser designated bomb is using a pattern that is randomly generated or at least nonrepeating.