Look for the chroot (change root) HOWTOs. If you are using protfpd as your ftp package, jailing a user into their home directory is very very easy. Look at proftpd's online documentation. It's very straightforward.
I'm pretty sure you can also chroot with ssh as well, though I have never tried to do it.
A third senario is to set up a restricted shell in which you define not only what permissions users have to their home directories, but also what actual commands they can run (you can, for instance, only allow users to do an 'ls' and nothing else if you want).
If you want the code for the restricted shell, let me know and I'll post it. Using chroot, however, is probably the best solution.