In very broad lines:
You use a theme to format the actual page. A theme is a collection of template files, which are just PHP files that can thus do anything. Which template file is included depends on the request, and is outlined in the template hierarchy. At a minimum you need an
index.php page, but most themes have
single.php for displaying single posts,
page.php for displaying single pages, and
archive.php for displaying a list of posts (date, category, tag, ... archives).
Most of the time, the posts are queried for you by WordPress depending on the request, so you don't have to call
query_posts() yourself. Most content is displayed by template tags, PHP functions that display a specific item:
the_content() for the main content,
the_date() for the formatted date... You see them used a lot without arguments, because they get the post data from global variables. These global vars are set in the beginning of The Loop, which is thus just a normal loop with some global vars set in each iteration.
You can do anything hard-coded in your theme files, but a lot of useful code snippets are bundled in widgets. Most widgets are displayed in sidebars, which you can define for your theme. The idea is that administrators of your site can drag and drop widgets in a user-friendly way to change the layout of their site. The term sidebar should be understood as widget container, since they can also be used as footers, or even the main content area of your site. Again, it's up to you to define how many sidebars you want in each template file. Personally I hard-code almost nothing in my theme files, even if it's for my own site, because it improves re-usability and er... because it feels better?
If you want to modify a part of a function, check to see whether is has hooks. A hook is a way to extend the functionality of a function: for example, the
the_content() function calls the
the_content hook with the post content and returns whatever results after calling all hooks. This allows you, or other plugins you use, to modify the
the_content() function. There are two types of hooks: filters which get a value, can modify it and must return the new value (if you forget this the original function will also return nothing), and actions which can do anything but don't have to return a value.
I hope this quick introduction gives you an overview of the main concepts of theme design in WordPress, if there is anything else, just ask.