If you're annotating within PGN files then you merely put your comments in brackets {Like this.}, between moves. If you're using HTML then you can separate comments from moves any way you like: different fonts, different effects, different colors, different boldness, whatever.
How do you annotate a game?

Isn't there also a way to use a board editor on this site and move the pieces around, thus producing alternate lines? How do you do that?

Although they all work basically the same, it depends on which pgn reader you are using.
If you are using the chess.com utility which opens when you click the little checkerboard icon above the comment box, you can add comments before or after each move using the [Game Editor] tab.
In SCID you use the "Comment Editor". It's a button with quotation marks on it.
In ChessCat you select [Move Annotation] from the [Edit} drop down menu.
You can even use the ChessTempo game explorer by pasting your pgn into the clipboard beneath the diagram and then clicking the baloon icon beneath the 'moves' box.

Yes, the board editor is what you get when you click the little checkerboard icon on the comment box toolbar.

Be advised - if you use the c.c board editor don't take too much time or you will loose all that you have done. I think it allows about 15/20 minutes.

Yes, doing it on the board editor here has frustrated me to no end. There's almost no possible way to do the whole game in time, and all of my work usually just vanishes when I try to post the game.
I have dealt with this by saving the pgn to my computer, and then opening it up in notepad or as a text document and editing it there, then when it's finished copy and pasting it to the board editor.
Basically you put text you want to add in {brackets} and alternate lines you want to show in (parenthesis). Here's one of mine so you can see the format:
[Event "Live Chess"]
[Site "Chess.com"]
[Date "2015.07.19"]
[White "chester6"]
[Black "attilaturzo"]
[Result "0-1"]
[WhiteElo "1562"]
[BlackElo "2321"]
[TimeControl "60|60"]
[Termination "attilaturzo won by resignation"]
1.d4 Nf6 2.c4 c5 3.d5 b5 4.cxb5 a6 5.bxa6 g6 6.Nc3 Bxa6 7.g3 Bg7 8.Bg2 d6 9.Nf3 Nbd7 10.Rb1 Nb6
11.b3 Bc8 12.O-O { 12.O-O? is indicative of the blindness I suffer from all too often. I just didn't see 12...Bf5. I think much better was 12.e4. } 12...Bf5 { I thought my game was falling apart already, and it took me forever to find anything halfway decent here. } 13.Rb2 { I think the only move that holds on. } ( 13.Ra1 Nfxd5 14. Nxd5 Bxa1 ) ( 13.e4 Nxe4 14. Nxe4 Bxe4 15. Nd2 Bxb1 ) 13...Ne4 ( 13...Nfxd5 14.Nxd5 Bxb2 15. Bxb2 O-O ) ( 13...Nbxd5 14.Nxd5 Nxd5 15.Qxd5 Bxb2 16.Bxb2 O-O ) 14.Nxe4 Bxe4 ( 14...Bxb2 15. Bxb2 O-O 16. Nh4 ) 15.Rd2 { I think I have more or less recovered from the scare of 12...Bf5. This was the highlight of the game for me. From this point on I failed to come up with any good plans. Although I was able to hold on to the extra pawn for awhile, I think my fixation on material was my downfall in this game. } 15...O-O 16.Ng5 Bxg2 17.Kxg2 Ra6 18.e4 Qa8 19.Qe2 Nd7 20.Rc2 Qa7
21.h4 { I didn't really see a way to make any of my pieces better here. I was also already beginning to become concerned with my clock. I considered 21.f4 or 21.h4 in an attempt to weaken his king a little. The brief look I took at the computer analysis, which I will examine more closely after this analysis, suggested 21.f4 instead of 21.h4. Go figure. } 21...h6 22.Nh3 { Not a great looking knight, but I thought on h3 it could get to f4, and had some influence over g5. When considering 22.Nf3 all I saw was a knight that couldn't move forward. } 22...Ra8 23.a4 { Here I was litterally asking myself "a3 or a4, a3 or a4?" Time was becoming more of a concern and I decided to try and get the a pawn moving forward, but a3 was the correct answer. } 23...Rb6 { Now I realized I couldn't hold on to the extra pawn and had to create some initiative of my own. } 24.f4 Rxb3 25.Ra2 Nf6 26.Qc2 Rb4 27.a5 Rxe4 28.Bb2 Qa6 29.Rf2 { This is another example of my blindness. I already had the idea of Bxf6 Bxf6 Qxe4, but I was scared of Re2+. I overlooked the fact that my rook on a2 would also be defending in that case. } ( 29.Bxf6 Bxf6 30.Qxe4 ) ( 29.Bxf6 Re2+ 30.Qxe2 Qxe2 31.Rxe2 ) 29...Rc4 { The rest of the game I was in serious time pressure, and I was pretty much just seeing how many moves I could make before it all fell apart. } 30.Qd3 Ne4
31.Re2 f5 32.Bxg7 Kxg7 33.Rec2 Rxc2+ 34.Qxc2 Qb5 35.Qa4 Qd3 36.Qa3 Qxd5 37.a6 { More blindness here. I didn't even see the discovered check; the final nail in the coffin. } 37...Nc3+ 38.Kh2 Qxa2+ 39.Qxa2 Nxa2 { I almost made a few more moves just to say I made it to 40 moves against an IM, but the game was truly over at move 37 so I just threw in the towel. } 0-1

To properly annotate a game one must do the following:
-Read Botvinnik and/or Smyslov's annotations.
-When an offbeat and/or dubious at best move is played follow up with, "Every Russian schoolboy knows x is the proper move for the following reasons."
-Make sentences unwieldy. Instead of, " Black wants to play ...Bxc3 here because Nd5 brings down too much pressure on f6" "Black wants to play ...Bxc3 here due to the fact that there would be too much pressure on f6." This adds a Soviet flair to your annotations. Kotov and others wrote like this.
-Make references to GM's commentaries, such as, "Botvinnik here suggests this for the following reasons."
For those who want the power of Chessbase annotations but find it too pricey, just buy the Fritz software. I got the "fritz for fun" last year after my old Chessbase software from Windws 98 era failed to install on Win7+ computers, and unless you are a seriously diehard chess database user (you'll know if you are already), it can do everything CB can do, including the core database functions. I don't miss anything from CB at all.

Thanks all. Humorous annotations from some of you. I'm certainly glad I heard about the time limitation for entering the material on this site. Thanks.
I have never used ChessBase. I would like to buy ChessBase, Fritz, and the Mega Database. I have a Mac, but I assume everything would work with a PC emulator.
Does anyone have a link to the part of chesstempo for entering PGNs? I don't think it is the opening explorer. There is another feature for entering PGNs I believe.

First - why buy something when SCID is free?
Second - The ChessTempo Opening Explorer IS what I'm referring to. It is one of the most wonderful user utilities available on the entire world wide web. It is light years ahead of the others.
Here's a link:
http://chesstempo.com/game-database.html
Click the clipboard icon beneath the diagram and paste your pgn - hit [OK]
the moves should appear in the [Game] box left of the diagram. You can then add sidelines simply by making the moves on the board or by selecting them from the candidates move list on the right of the diagram. If the move is not listed you can make it anyway by moving the piece. No other database explorers have this feature.
Beneath the [Game] box where the moves are displayed is a button with a balloon type icon. It's 5th from the right and 5th from the left. Click that and you'll get a box to type in your comment with the option of placing the comment before the move or after (by default).
When you are finished, click the download icon which is 2nd from left beneath the [Game] box. Looks like a scrolled piece of paper. Then you have the option of opening it with notepad or saving it to your downloads folder.
If you save it unfinished then you can repaste it later and continue to work on it.

@wormrose
Scid is not very user friendly, is it?
On CT I went to:
http://chesstempo.com/chess-openings.html
However,
http://chesstempo.com/game-database.html
sounds perfect! Thanks.

My own experience was that SCID was easier to use than ChessBase. There is a SCID user group here
http://www.chess.com/groups/home/scid-users

@chester6, I have the same problems.
This is not the problem of this site in particular. Anyone who normally takes time to go over what they've wrote before posting it would have had the same experience several times in any kind of websites before they learn to use their local computer tools like notepad for backup. It's just an internet thing called session timeout.
I played a game and posted in my blog. How do I annotate the game? I have never done this. Thanks.