If Ubuntu doesn't format your USB Drive (possibly an Ubuntu USB stick) with an error saying
This partition cannot be modified because it contains a partition table; >please reinitialize layout of the whole device. (udisks-error-quark, 11)
Do this:
sudo dd if=/dev/zero of=/dev/sdb bs=1M
(where /dev/sdb
is the device to be formatted)
This will copy zeroes in a low-level way to your USB. After this, you can retry formatting from Nautilus/GParted.