LaTeX commands do do something. For example, in the case of \author, the command does the following:
\gdef\@author{#1}
That is \author globally defines a macro \@author to store the name of the author for use later.
\@author is then called when you place \maketitle (depending on how a particular class defines \maketitle). So, \author is a command that takes 1 argument and stores that argument in another, internal, command \@author which can be called later on.
The commands \author and \title are usually set in the preamble to your document:
\documentclass{article}
\author{Martin}
\title{My document title}
\begin{document}
\maketitle
Content of my document.
\end{document}

It's a bit more difficult to get the content of \@author. For example, in the article class, once you call \maketitle, the content of the macro \@author is cleared. You could work around this by doing something along the following lines:
\documentclass{article}
\author{Martin}
\title{My document title}
\makeatletter
\let\my@author\@author
\newcommand\getauthor{\my@author}
\makeatother
\begin{document}
\maketitle
Content of my document.
The author's name is \getauthor.
\end{document}

What I've done here is save the content of \@author in my own macro \my@author. Then I define a command to retrieve the content of my macro.
If you want to access the title of your document, then you should do something similar to what I did for accessing the author:
\makeatletter
\let\my@title\@title
\newcommand\getmytitle{\my@title}
\makeatother
What's import here is that the letting be done after you've called \author and \title. Otherwise, you'll most likely get an error message. That is \@author and \@title are defined to issue errors if you try to use them and they haven't already been defined by call from \author{...} and \title{...}.
Deeper issue of what a command is about
Some commands in LaTeX take an apparently "immediate" effect such as \textbf{...} which will set the content of the argument in a bold font, \section{...} which will start a new section whose title will be that of the passed argument. Some commands require multiple runs of LaTeX before things settle down: for example, \tableofcontents. Some commands work in tandem: \label{...} and \ref{...}. Some commands don't seem to take any effect until something else happens: such as in the case of \author{...} and \title{...} whose effects are not noticeable until you call \maketitle.
Depending on what kind of a background you're coming from, it can be a bit tricky thinking about LaTeX macros/commands. There are various complicating factors: The asynchronous nature of how LaTeX makes various formatting decisions can lead to many headaches if you're not aware of them. Some commands expand when you call them (in the mouth of LaTeX). Other commands wait until they're in the gullet.
Generally, it's a very broad topic that is probably best handled on a case by case basis.
The suggestion in the comments to your question to read TeX by Topic is a very good suggestion. If you're just trying to write a document and the commands aren't doing what you're expecting them to do, there are quite a number of good resources. You might want to check out some of the titles suggested at What is the best book to start learning LaTeX?. Of course, if you really want to get into the nuts-and-bolts of it, there's The TeXbook by Donald Knuth (but if you're just getting started, it's not the first place I would recommend someone look).
If you want to see how individual commands are defined, there are several approaches. If you have access to a command line and you're working on a Linux box or Mac, then you can try to locate a given class and look at the actual code. Alternatively, you can call from the command line texdef (or latexdef--though I've not had success with latexdef on my Mac), to see the source code for a command:
$ texdef -t latex -c article maketitle -s
which will spit out to your terminal the definition that the article class uses for \maketitle.
You can also use texdoc source2 to look at the documentation for LaTeX kernel. Or texdoc article to get the documentation for the standard document classes.
\authorand\titleas what is called setters in other programming languages. In Java, you would probably call themsetAuthor()andsetTitle(), respectively. They set internal ("private") state that is then used by other commands ("methods"), in this case it is\maketitlethat uses the "private" state and actually does typeset it. – Daniel Oct 23 '13 at 07:20\author{text}does nothing? Of course it produces no text in the document and no messages on screen, but surely code in many programming languages will do that. One can even type commands in a command line window and have apparently nothing happen. – Dan Oct 23 '13 at 18:47