sudo apt-get install alien
will install alien on to your Ubuntu machine.
Now to convert rpm to debian use
where rpm-package.rpm is your rpm file. A .deb file with same name will be created.
And to convert .deb to .rpm use
alien -r deb-package.deb
where deb-package.deb is your .deb file. A .rpm file with the same name but .rpm extension will be generated.
The same command can be used to convert many other formats. To know more just use the man pages of your Ubuntu machine.