A context menu provides additional options related to a specific view—the same concept as a right-click on the desktop. Android currently supports two different approaches: the floating context menu and Contextual Mode. Contextual Action Mode was introduced in Android 3.0. The older floating context menu could lead to confusion since there was no indication of the currently selected item and it didn't support actions on multiple items—such as selecting multiple emails to delete in one action.
Enabling Contextual Action Mode for a view
Creating a floating context menu
If you need to use the old-style context menu, for example to support pre-Android 3.0 devices, it's very similar to the Option Menu API...