With the printer attached and turned on, run Printers or Printing (depending on
what version of Ubuntu you use) select Add or +, local or network, wait a few
seconds, click on the printer, select OK or Continue until the printer is
installed.
This approach has worked every time for me over the past three years, while
testing well over a dozen distros/versions of Linux.
People can provide much better help if you say, "I did A and B and C and
expected result X, but this other thing happened instead."