Farm solutions and sandboxed solutions differ in how they are hosted, deployed, and their level of access. Farm solutions are hosted in the IIS worker process and have full trust access, while sandboxed solutions are hosted separately and have restricted access. Deploying farm solutions recycles application pools, while sandboxed solutions do not. Sandboxed solutions are limited in what code they can run for security reasons.