Pros and cons of buying a foreclosed home

Q. I have been looking for my first house and have been told to look at bank-owned properties or HUD properties. I am wondering what advantages or disadvantages there are to these types of deals.