The main similarity between the two is that they are both Javascript libraries. Jquery is the type of library that has been created for DOM operations. If you are not familiar with DOM, this means Document Object Model. This can be used when fixing the web browsers of varying web servers.
Jquery UI, based on its name, is something that can be used when working with UI. One difference between the two is that Jquery UI will come with different features that Jquery will not have. For example, it will contain various widgets that will be effective for the use of people who are dealing with UI related processes.