This is a tough question because you will never play the same game of DotA twice. DotA is always situational. However I can try to give you some advice depending on what type of supports you are playing and how your team is doing.
First thing to have in mind
The carry is the 1 role because a carry can win the game by himself. Good carry + bad support = tough game (hardly winnable). Bad carry + good support = lost game (and painfull game if you are the support).
If you want to win a game of DotA, your carry has to have a fairly easy game. It is then up to you (and your mid) to give your carry the space he needs to win you the game. Nothing is more rewarding as a support than letting your carry free farm for 45 min then watch him take down the entire enemy team by himself, all thanks to you.
Second thing to have in mind
Your mid (role 2) is almost as important as your carry. You can see your mid as your "mid-game carry" (in most situations). The mid player will be your mid game pillar (from min ~15 to min ~40) and it's his role (and yours) to apply enough pressure on the enemy team so your carry can reach the late-game without trouble.
Types of supports and early gameplay
You are now aware of the 2 mains roles of your team. It is your job as a support to make their lanes easy.
To understand how to do your job well (or know when to be agressive/defensive etc.) you have to understand the different lane configurations you can have with supports.
Offensive tri-lane supports : in an offensive tri-lane the goal is to contest the farm of the enemey carry or pull off a combo that will give you lots of early kills allowing you to snowball into the midgame. Supports in offensive tri-lanes will bring regen, wards to cover the jungle near the lane and try to be as agressive as possible. Your tri-lane carry will get the last-hits while you try to set up kills. You will also contest enemy supports that are stacking and pulling to deny them as much XP as possible. In offensive tri-lanes you will find supports with powerful disables and nukes such as : Visage, Venomancer, Shadow Demon, Vengeful Spirit or Lina.
Defensive tri-lane supports : Played in safe lane, the defensive tri-lane has to offer a free and really easy lane to farm for your carry. The 2 supports will have 2 main tasks : Control the lane (with stacking and pulling) and zone the enemy offlaner out of the lane. Usually one of the supports will be dedicated to stack the camp while the other harass the enemy hero in the lane. Supports in defensive tri-lanes offer powerful defensive spells such as heals or harassing nukes : Dazzle, Ezalor, Treant, Sand King.
Dual lane supports : When your team runs a jungler, you can have a dual lane (generaly in the safe lane) carry + support. The support in this scenario will be focused on stacking and pulling to get fast levels (in order not to become irrelevant in the mid game). Make sure to get some wards up to avoid ganks on your carry. Think about this lane as a defensive tri-lane where you have to both stack/pull and harass the enemy in lane.
Roaming Supports : The roaming support will be focused on ganking the enemy mid as much as possible. This can secure an easy mid game for your team thanks to the free farm given to your mid. You generally want to have a support with 2 disables (stun + slow) or at least 1 reliable disable. Some common roaming supports : Crystal Maiden (Frostbite + Crystal nova), Vengeful Spirit (Magic missile + Wave of terror), Venomancer (double slow) etc. You will want to use smoke of deceit to come undetected in the mid lane, and you usually place wards on the rune spot for a better visibility of the map and a better rune control.
Jungling Supports : The jungling support will be focused on getting early levels and free farm in order to rush a specific item (often the mekansm). There are few supports that can jungle, the most common are Enchanteress (will get an early urn or mek) and Chen (for a fast mek and level 6). When playing Chen or Enchanteress, Your team will expect you to come with your creeps and gank once in a while (with smoke), then push the lane (because your creeps can tank towers or cut the creep wave behind the tower).
Farming Supports : Pretty much the same as jungling supports, farming support's goal is to get free XP. Usually those supports benefit a lot from level 6 (Nyx Assassin, Lion, Wisp etc.). They do not have a great farming ability but they will be given some free space to stack and pull or a free lane at some point in the game (When your mid leaves the lane to go gank for example)
Hard Support : When you run more than 1 support (1 lane support + 1 roaming,2 tri-lane supports , dual roaming supports etc.), this term designates the one who will get no farm and will be focused on buying : Wards/Smoke/Courier/Flying Courier/Sentries/Dust etc. You can eventually get boots at some point if nothing else is needed. You have to be useful for your team, with no gold, with few levels and without feeding. Playing hard support is really hard because of that.
Playing Support in the later portion of the game
Once the laning stage is over and you have accomplished your lane's tasks (depending on your role : jungle, roam, get XP, be in a killing spree in your tri-lane etc.) you have to undestand what your hero does bring to the team.
If your hero is a ganker (such as Nyx) you goal is to apply pressure on the enemy team. If your hero has great defensive abilities, you can stay near your carry in order to secure his farm. If you are a great initator (Earthshaker, Clockwerk etc.) stay with the part of your team that is pushing and try to get a great initiation (or coutner initiation).
Think before acting. As a support you always have to ask yourself : "what does my team need ?" and "what does my carry need ?"
At this point of the game, the only part of "early supporting" that you really have to assume is putting up wards and getting detection agaisnt invisible units. The rest of your role depend on the hero you are playing. Once you understand how the abilities of your hero come into play, you will understand how your team can benefit from you.
A few tips
- Ward before being asked to (this guide might come in handy)
- Always keep a TP scroll on you (provided enough gold) so you can quickly react to a gank or to defend a tower.
- Your life is worth less than any other role (carry, mid, off-laner) so if you can bait the enemy into killing you instead of your carry, do it.
- A ghost scepter is a life savior versus most carries
- Get a wand, this will give you a better life and mana pool and it's really cheap
- An urn is another easy way to get life (strength), mana regen and a great heal/DOT (damage over time)
- You rarely need more than brown boots (except for farming support who will often get arcane boots)
- You are an easy target, don't put yourself in danger if not necessary
- If you have gold lategame consider buying : A Vladimir's offering, a Pipe, a Mekansm (if not already done), a Forcestaff/Blink Dagger (for initiation and escape)