More often than not, the terms refer to who is active and who is receptive- a bottom is usually one who is penetrated and touched and licked, whilst the top is the one doing the penetrating and touching and licking.
It can also refer, however, to simply being the more dominant partner, the one who likes being in control, even if they are are the ones being penetrated/touched/licked (sometimes we call that "topping from below", when you are in a "bottom" position but still retain the attitude and control of a top).