There are some users in my Sharepoint site. I want to prevent them from using a specific list or library. And even I don't want them to see that list or library. In other words I want to create a list or library which is hidden to some users and not hidden to others. What should I do?
I'd aree with Diptarag - MSDN has some good documentation on this one. http://technet.microsoft.com/en-us/library/cc721640.aspx
You can set permissions at multiple levels - Site Collection, Site, List. List should give you what you need.
Edit the permission of the list and set the access level accordingly, you can even give permission to only a few user to a list or library. You can find list permission under list settings. I would recommend creating a group if you need this set of user in some other place also, otherwise if you know that you have to use this permission set only for a particular list then go on add/remove particular user from list permission.