First, you must prepare by gathering your team and selecting the participants.
The team doing the interviews will need at least two members, with eight to twelve being the maximum. This will depend on the scope of the study, but you should try for at least four team members. Typically a site visit will be made by four of the team members. You should try to select team members from different areas, but you may have to trade this off against getting people who you think will make good inquirers. The one group that you really want to have represented on the team is the developers who will be creating the system. This will give you a direct conduit for the information obtained from the Contextual inquiry to those who can use the information. If possible, you also include trainers, writers, salespeople, marketers, managers, and tech support on the team. They'll each contriburte a different perspective, each of which is important to a successful product.
Choosing the sites to visit is going to depend on the expediencies of the situation, of course. As with other usability methods, you want to choose users that are representative of those for whom the system is being developed, and will cover the breadth and depth of variation. It may be helpful to have advice from a domain expert, so you can get a better idea of who to visit, both individually and functionally. The stereotypical Contextual study will visit five sites and four users at each site for a total of twenty interviews.It is important that you have a good understanding the structure of the work so you have an idea of who you'd like to start talking to. Let's say for instance I want to develop a system to support alpine skiing coaches. I'd want to interview coaches at all levels - club, provincial, and national, also coaches for all the different age ranges, and levels of coaching experience as well as other parameters. As you can see, this is probably too unfocused for contextual techniques, so maybe I'd want to refine my focus further. To choose the users, you want to look at people who will be using the system, as well as "surrounding" individuals, those upstream and downstream in the information flow as well as managers, system administrators, the user's customers, etc. Select users you think will challenge and develop your understanding.