1. He is used to working on the farm.

2. He got used to working on the farm.
3. He used to walk in the park alone.
4. The toy can be used as a pillow.
(Are they all grammatical? What is the difference between 1 and 2?)

All are correct, yes.

1 and 2 mean about the same thing. The word "got" is considered more casual than simply using "is."