With the exception of a few highly specialized matters, such as practice before the Patent Office which imposes its own additional educational and training requirements, any licensed lawyer generally can take on any type of matter within the state(s) he or she is admitted to practice.
Physicians offer a good analogy. A medical school graduate, once licensed, is legally authorized to practice all types of medicine. Many fine physicians train to engage in General Practice or Family Practice. Some train as medical or surgical "residents" for six years or longer to engage in specialties (such as General Surgery) or more narrow sub-specialties (such as Urology Surgery). A few go even further and become sub-sub-specialists (such as in Pediatric Urology). While in theory any physician can do anything, except in an emergency, few do. The medical General Practitioner typically refers to a specialist those patients that need a specialist.
The same is generally true in law. Many lawyers engage in "General Practice", either alone or as part of a law firm, and refer matters that fall beyond their expertise to specialists either within their law firm or outside their law firm.