Is there any way to hide certain files and folders from certain people, but make it so the people with the correct permissions can see and access the files
If you remove the permission on the item level, only people with at least read permission can see the item.
If we're talking about documents and libraries I strongly recomment using folders and change the permission on the folders. All documents in the folders will then inherit the folder permission.
Considering two users (A & B) and one library with two folders (Public & Secret) user A has read permission to both folders and can read all documents in the library. User B on the other hand only has read permission to the folder called Public. For user B it would seem the library only contains one folder called Public.
Using the permission approach is the only true way in terms of security. You can do a "security by obscurity" approach by using views and hiding the documents/items, but any half-smart end user would be able to figure out a way to get to see all items.
Just as Morten and Kristaps said. It is possible to do so with break permission inheritance.
For files, go to the properties of the file, find the shared with button in the view ribbon. Click on it and then select stop sharing in the pop up window. Make sure you have select all the required users to be shared with the file.
For subfolder, also to the shared with button. This time you shall select advanced button in the pop up. Break permission inheritance and then customize the permission level on different groups according to your requirements.