The Joomla Access Control functionality allows you to easily set items which should be displayed to guests, but hidden from logged in users.
If you go to the User Manager options you will see a setting for the default group that registered users are placed, you will also see a default group for guests (non logged in users). The latter group can be used to create a new group at the same level in the ACL tree for guests.
- Create a Guest Group in the User Manager
- Add a new Guest Viewing Access Level
- Change the default guest group in the User Manager options
Assign modules or menu links to the new group
To hide menu items or module, what you will to do is assign any menu link or module to the newly created Guest level and because it is at the same level in the ACL tree as Registered anything assigned to guest will not be visible to registered users.