The caliper is in two parts, the mounting plate and the actual caliper itself. The mounting plate bolts to the fork and the caliper floats on the pins so that when you operate the brake, the piston pushes the outer pad onto the disc, as it does this, the caliper body is pushed in the other direction forcing the inner pad onto the other side of the disc.
The squeaking you can hear is probably you speedo cable rubbing on a wiring harness or part of the frame/plastic.
If you have loosened the bolts you can take the caliper off to have a look inside to see what the noise was being caused by. Remember, DO NOT squeeze the brake lever while the caliper is off the disc.