Move the toilet and toilet seat around as much as you can. Also move the back of the toilet tank away from the wall to see whether that is causing the noise. Isolating the source of the squeak should be your first step toward getting rid of it. A toilet can squeak for a number of reasons, from a stuck floater ball in the tank to a loose bolt on the toilet seat.
Tighten the screws or bolts that hold the toilet seat on if you suspect that they are loose. If the seat moves easily from side to side, chances are the bolts that hold it in place have begun to work their way loose. The area where the toilet seat attaches to the rest of the toilet is a frequent source of squeaks.
Test the toilet seat for squeaks again. The seat should feel more solid after the bolts are tightened, and it should not move from side to side as easily. Spray the bolts or screws with WD-40 or a similar spray lubricant, if the area is still squeaking. You might need to apply several coatings of lubricant to get the squeak to go away completely.
Remove the toilet seat again if it is still squeaking. Use your finger to insert a small amount of petroleum jelly into the slot where the seat attaches, then reattach the toilet seat. Wipe away any excess petroleum jelly from the area around the hinges and the toilet seat. Check the seat before you use the toilet for the first time to ensure no petroleum jelly remains on or around it.
Take off the top of the toilet tank and set it aside. Move the float ball up and down, pulling it up and allowing it to fall back into the water. A sticking float ball can cause the toilet to squeak when you flush the toilet.