The link above is your friend. It's a starter guide for Ubuntu 5.04, but the instructions are the same for 5.10, I think.
Read the General Notes section and then follow the instructions under the section How to install DVD playback capability?
Other handy info on the topic can be found on the restricted formats page of the Ubuntu wiki
. Generally, I go there first for Ubuntu questions