I don't think the accepted answer gives a full picture, these principles are very similar but differ a bit in approach and philosophy.
TL;DR
Onion: Domain model is correct, data reflects domain model.
Layered: Data is correct, domain model reflects data.
Onion
Onion puts the Domain Model, such as POJO and rich domain classes at the center of the application where persistence is a plugin to the application.
#Example
You have an Order with Items. You add the item to the order
object itself then persist it with a tool.
var order = yourOrder;
// assigns the order id or uses maybe an ORM to handle it
order.AddItem(item); Orders.Update(order);
Layered
Layered puts the data itself in the center. The data is then interacted through the domain model to get a rich representation of the data.
#Example
Order has items.
To add item to Order you add an Item with reference to the Order.
To get the updated order you can reload the order with the items to get the updated version of the data according to the DB.
OrderItems.Create(itemWithOrderId);
Order = Orders.Read(orderId, { withItems = true })
Common features
UI, API, authentication, services and use cases are the same in both. The outside interacting with the application is the exact same.
Considerations
Not to say that the DB should decide how the application should look like but I feel like Onion is more suited towards document databases like MongoDB since you don't need complex mapping, persisting etc. If you have an SQL DB I would rather like to say "insert into Table ..." and assume the data is correct because of a strongly enforced schema.