A patent lawyer is a person having a background in science or engineering, and a law degree, and who passed a rigorous test for the special privilege of advising clients about patents. A patent "agent" may have similar technical credentials, but is not licensed to practice law.
In either case (lawyer or agent), an application can be prepared and filed for a client. However, a patent lawyer can provide more in-depth advice such as the legal implications of various tactics or strategies in pursuing a patent, licensing it, or enforcing it against others.
Many patent lawyers also offer related services in federal and state trademarks, technology licensing, computer law, regulatory law (e.g., FDA approvals), and other legal aspects of science or engineering.