If you bought an item for collection eBay should have sent you a collection code. If someone tried to collect it without this code the seller (or click and collect store) should have refused to hand it over.
You haven't given us much information, but did you ask the seller or store why they let someone have it without the code?
The bottom line is that if it's not available for you to collect you can open an item not received case under eBay's money back guarantee. If the seller or shop can't show eBay that they received the code required to release the item you should get a full refund.
Don't delay - you will need to show that you or attempted to collect it withn 7 days.