The campus and the town are integrated; there are halls of residence in various spots in the town. This one is Hamilton: there are a good few others, of varying degrees of appeal in aesthetic terms: Google Image Result for http://news.bbc.co.uk/sol/shared/spl/hi/pop_ups/05/golf_st_andrews_history_&_landmarks/img/11.jpg
It's a very small town - you step outside your hall of residence or a faculty building - again, many are impressive - and you are in the town, but the town is a university town - you will bump into fellow students and staff everywhere. There isn't much else there apart from the golf. And the sea, and the beaches, and the sunrise over the sea. (I saw the northern lights there, just as an aside.) If you are used to big cities, it might seem a little dull, but then you will make friends and it won't be dull any longer.
You could think of it as a campus with a town in it.
Accommodation varies. Generally you will get a small, plain, serviceable room with a washbasin in it, and a bathroom nearby.
It has a high academic profile; due to its undeniable beauty as well as its ranking, it attracts students who wanted to go to Oxbridge but didn't get in. It isn't in the same league, but often the people who don't get in to Oxford or Cambridge are rejected for the wrong reasons, so you will meet academically exciting people there if you go.