The first step is to setup the Raspberry Pi with Raspbian OS. I recommend googleing for the latest setup guide because these instructions vary slightly with time.
Additionally, we need to setup OpenHAB. For that, you should take a look at my detailed post at The Embedded Code
At this point you should have a working Raspberry Pi which can be accessed over the network as well as the latest version of OpenHAB which is ready to start up.