Sometimes the book store that hosts the book signing requires that you purchase the current book at that book store, and they make you show a cash register receipt before you can get in line. If the book signing advertisement does not state any requirements, usually the authors are happy to sign any of their books. (Some avid fans will bring stacks of books.) If there are lots of people waiting in line, they may limit each person to just one book. Some popular authors sign so many books that they have to ice their hand down every night on the book tour.
If your friends or relatives really like this author, an inscribed book makes a wonderful gift. It shows that you really put some thought and effort into finding the right gift for them. (It would be helpful if you would print the friend's name out legibly on a piece of paper, just to save time and prevent mistakes.)
From a book collecting viewpoint, the first book the author wrote is probably going to be the most valuable in the future, and it might be worth your while to find a very good condition first edition that you can get signed by the author, and then carefully preserve it. It might be worth big money someday.
Usually the author will give a short speech and then take questions. This is your chance to ask about that running joke that you just can't figure out, or lobby for more books about your favorite characters.
I really enjoy finally getting to meet my favorite authors, learning a little bit about their lives, and chatting with the other people waiting in line.