Can I produce a square wave(basically a clock) from a USB port on my Laptop? If yes how?
you can't get a clock out of a bare USB port, but there's devices you can attach that can produce a clock.

eg:

connect a USB serial port  (or usb uart cable like "FTDI" if you want didgital signal level) and send it lots of ASCII "U" characters, you'll get a square wave at frequency 1/2 the baud rate so long as you keep on sending the "UUUUUUU"