An undocked item (usually a ship or vehicle) is simply out in the open, it's more valuable because the new owner doesn't have to jump through hoops to get it out
To undock, you simply have to have access to the entity that is holding it and pushing it outside (or enter the docked entity and move it out manually)
It's similar to having items not under a shield, forcing the new owner to search for anyone who can give them access (and some factions won't let you through under any circumstance if you are an outsider)
{Someone will come along soon telling me to stop spreading false information, and maybe if you are lucky give you better information}
Generally when people refer to docked items, they mean items they do not have access to. Most people actually keep items docked even when selling, but because they own the entity its docked in they can guarantee access, and so its not considered 'docked'. This also prevents some random person finding it and walking off with it.
If you have something that is docked, you need to use IC methods to discover the owner (usually by posting in the Traders Lounge forum section, or doing a hunt yourself based on the name of the thing your item is docked in) and from there deal with them to get it undocked.