Occasionally, you’ll find that no matter how long you wait - the stain is still tacky to the touch. If the temperature and humidity levels were correct during the application, that means either: the piece was not sanded down enough in the beginning, or there was too much stain used during the application.
If the coats of stain were too thick, the wood couldn’t absorb the stain correctly. This leaves the excess stain on top, unable to completely cure. Try lightly wiping down the piece with a rag soaked in mineral spirits. This should remove the excess stain, and allow the leftover to cure properly.
You can either leave the piece for another 24 hours to dry, or lightly sand it, and apply another coat of stain using much less stain. On the other hand, if the wood was not sanded down enough, and had a previous finish on it, the stain wouldn't be able to penetrate the wood due to the old finish blocking it.
Your best option would be to sand the piece completely - including the old finish - to bare wood and re-stain the piece.