This is a technique used in filmmaking where the focus of the lens is changed during a shot to focus from one object in the frame to another object without a lot of movement with the camera. The purpose is to shift the attention from one element in the frame to another without having to cut to a different angle. The more shallow the focus, the more noticeable this technique is to the viewer. For example, perhaps you have a character in the foreground who is unaware of a character standing behind him. To reveal this, the camera might focus on the main character, and the rack focus so the we can see the character in the background.
Here’s an example from CSI where they use rack focus to draw attention from the broken artifact to the scientist who is trying to piece it together.