You can arrive in the UK up to 1 week before your course starts which completely depends on the kind of course you are going to pursue and the study you have completed already.
University housing, some other long-term housing, and most temporary housing can be arranged in advance, before you travel to the UK. Some other long-term housing can only be arranged after you come to the UK.