The Javadocs tell you that the 10 sets the initial capacity of the queue. They also say
A priority queue is unbounded, but has an internal capacity governing the size of an array used to store the elements on the queue. It is always at least as large as the queue size. As elements are added to a priority queue, its capacity grows automatically. The details of the growth policy are not specified.
When you add items that take the queue beyond the capacity, it has to increase the size of the internal array. This takes a bit of time. So if you know how big the queue has to get you can set the capacity to be big enough in the first place, which saves this time.