Invoke Repositories vs. Libraries?

Both Invoke Repositories and Libraries are ways of promoting code reuse, but I would like to better understand the advantages (or disadvantages) of each. When is it best to use an invoke repository? When would it be better to use a library? What would be the thought process that should be used to decide which might be better in a given situation? Thanks.