By expending a full round action, you can meditate to enter a martial trance and gain focus. This action provokes attacks of opportunity. While in a martial trance, you can expend your focus on in order to take a 10 on your next attack roll. You can expend your focus any time you make an attack roll.
Once you have entered a martial trance, you remain focused until you expend your focus, go to sleep, or are knocked unconscious.