Like doctors and other professionals, attorneys are licensed by the various states to practice within the state’s borders. A doctor licensed in New Jersey generally cannot practice in Pennsylvania unless also licensed here. The same goes for attorneys.
Sometimes a court in one state will allow an attorney from another state to participate in a case by special permission, known as being admitted to practice pro hac vice. Literally, the term means “for this term” or “for this one particular occasion.” The doctrine allows an out of state attorney who is more knowledgeable about the case, or who is an expert in a particular field of law, to participate in proceedings without being a member of the local bar, so long as the attorney is in good standing in his or her home state. Some of the more famous (or should we say infamous) lawyers like F. Lee Bailey and Johnnie Cochran are often admitted pro hac vice to participate in high profile cases around the country.
— BBC&B