Shutting down should always work, because all programs are terminated and they stop using the disk. But you often don't have to go that far.
Logging out should also always work, for the same reasons, although the only programs that get terminated are the ones in the user account that is logged out.
If you don't want to log out, quit any apps you are no longer using.
Mac Mail is notorious for hanging onto files that have been attached to emails. If you attached a file from an external disk, Mail might not have let it go. Quitting Mail solves this problem.
The Finder sometimes doesn't let go of files either, like after you do a QuickLook on a file. Normally you can't quit the Finder except using Activity Monitor, so I add the Quit command using a utility like TinkerTool because quitting the Finder definitely helps with some problems.
Another solution is to upgrade to Lion, because I hear that the message is more specific about telling you exactly which program it is that's still using the disk.