You can look at the legacy DirectX SDK Direct3D 9 sample Pick or the Direct3D 10 sample Pick10.
Generally you don't actually want to use the same geometry to render as you do for doing collision detection. Most games will first use simple bounding geometry like spheres, axis-aligned boxes, oriented-boxes or cylinders and make decisions from that.
If after bounding volume tests you determine a possible intersection and you need face-level intersection testing, then you'd ideally do a face-by-face collision using a simplified mesh rather than the original complex geometry that is often made to avoid issues with convexity. For CAD and editors, you would likely do a face-by-face collision test of the 'true' geometry, but you'd maybe do that with a system memory copy rather than the render copy in the VB/IB for efficiency. With Direct3D 9, you can generally read POOL_MANAGED
resources but that's because there is already a system-memory copy in addition to the video memory copy. With Direct3D 10.x/11.x you'd want to maintain the collision data yourself outside the IB/VB rather than force the IB/VB to be in a 'DYNAMIC' mappable location.
And you can of course use various GPGPU techniques to try to accelerate collision detection, but that's quite complicated to get robust.