There are two major ways one can accomplish this. The best way is using the pen tool to manually make the selection. Unfortunately, a surprising number of people are not comfortable with the pen tool.
If you prefer a more automated method (ie, that doesn't use the pen tool), read through
THIS POST and the next few that follow in that thread.
The idea is to make a temporary version of the image with the local contrast and color differences artificially wildly increased. This allows one to use semi-automated selection tools like "Quick Select" to make a very good initial selection -- much better than you can do on the actual image. You may have to tweak this initial selection a bit using some of the manual selection tools (eg, polygonal lasso) in "add" or "subtract" mode. You then throw away the temporary / psychedelic version of the image and apply the selection to the original image.
To illustrate this, using ACR, I made two temporary, high local contrast copies of your image. The first was optimized to pick the cap (plus it's shrink-wrapped plastic covering) out of the background.
The second copy was optimized to pick the lower part of the pill bottle out of the background, as well as distinguish it from its own shadow.
I then combined the two selections, made some very small tweaks using the polygonal lasso tool, and demonstrate that it works by placing the entire, unmodified version of the pill bottle on a new background.
Note, however that I made no attempt to re-introduce a shadow under the item to make it look more realistic and blend with the new background.
Tom M