Rolig is used to mean any one of the following: fun, funny, entertaining, interesting. You can use it to describe people, objects, experiences and much more — anything which brings a smile to your face. You can also use it in the sense of 'funny' meaning 'odd', so 'en rolig liten gubbe' might refer to a funny-looking man, rather than one with a humorous personality — you'd have to rely on tone to work out which meaning was intended.
Rolig is an adjective, so it declines in the usual way, meaning you'll see roligt used with 'ett' words and roliga for plurals. And you'll also hear it in the set phrase “att ha (det) roligt” (to have fun), using the adverbial form.
The history of the word rolig is packed with linguistic twists and turns. It's been used by Swedish speakers since at least 1655, when it appeared in the Swedish translation of the bible.
But back then, rolig meant 'calm' or 'quiet', almost the opposite of today's meaning. And it is used in present-day Danish and Norwegian to mean 'calm' too, so that a Dane and a Swede might end up confused and disappointed if one invites the other for 'en rolig helg' (a fun/quiet weekend, depending on who's speaking).
Allow us to explain. Words often change their meaning over time, sometimes to reflect changes in society and how people live, sometimes to fill an obvious gap in the lexicon, and sometimes for no obvious reason at all. This process tends to happen most often and most quickly with adjectives. Sometimes an adjective is used so much that its meaning is weakened, or it is used so often in a certain context that it takes on a narrower connotation than it earlier had.
In the case of rolig, the original usage in the sense of 'calm/quiet' tended to have a positive connotation, and so over time it came to be used to mean 'pleasant' more generally. Over recent decades, its meaning has grown stronger, so that it is closer to meaning 'fun' or kul than 'nice' or trevlig.
This helps explain why rolig's apparent opposite, orolig, actually means 'anxious/worried' rather than 'not fun' — in contrast to rolig' orolig is almost always used to describe people. And there are other traces in Swedish of the older meaning. The word ro, the root of rolig, still means 'peace/tranquility' and is used in the phrase 'lugn och ro' (peace and quiet).
Ha det så roligt!
Have fun/have a nice time! (This is a very typical Swedish construction, so should win you some language brownie points with native speakers)
Jag vill se en rolig film ikväll
I want to see a funny film tonight
Han är inte så rolig att leva med
He isn't that easy to live with