I have a navigation menu in a menu block. I want some of the links in the menu to be hidden if user doesn't have role xxx.
What is the best way to do so?
The best way to do it would be simply to restrict access to those pages to only the roles you wish to be able to see them. The menu system will automatically not print out links for pages the user cannot access.
How to do this depends on what you're linking to. If it's nodes, perhaps the core per-content-type permissions are enough. If not, there is a variety of node access modules you can use to implement more fine-grained node access, using taxonomy or other methods. If those pages are Views, you can set a View to only be available for certain roles.
If you are running D6, http://drupal.org/project/menu_per_role is a great way to go, alas, from its documentation, it's not yet running very well on D7.
Use the Menu Per Role module - even though it's DEV it works great on my Drupal 7 sites. It allows you to define the user roles allowed to see each menu item. You either define for which user roles to show it, or for which roles to hide it. For other roles, it stays with the default. Here is a screenshot of the settings screen: