Most general optimizations don't matter, and you really shouldn't worry about performance terribly, as the other answer said, but I'm going to provide some very specific rules that you should follow regardless:
Use Configuration instead of Code, if at all possible.
This is simply because code uses execution time, and configuration does not (the 10,000 ms limit). There is a higher limit of 10 minutes per transaction that does include validations, etc, but those are much harder to reach. Validation rules, workflow rules, sharing rules, and rollup summaries are standard elements that can be replicated in Apex Code, but shouldn't be without reason.
Use Maps instead of Loops, if at all possible.
A for loop inside a for loop uses multiplicative processing time (specifically, x*y processing time), which is a major performance drain if not considered carefully. For example, if you're in a contact trigger, and you query all accounts, and loop through each account to see if it matches the contact, that's bad. 200 accounts and 200 contacts becomes 40,000 loop cycles instead of 200 cycles by using a map. You can, and probably will, time out on larger transactions without the use of maps.
Query before Branches, if at all possible.
You should never write a loop like this:
for(Account record: [SELECT Id, Name, Date__c FROM Account WHERE Id IN :accountIds]) {
if(record.Date__c != null) {
...
When you could reduce the number of rows queried, loop cycles, and so on with this:
for(Account record: [SELECT Id, Name, Date__c FROM Account WHERE Id IN :accountIds AND Date__c != NULL]) {
...
The performance benefits are amazing when you do it this way. Also, query time isn't counted towards the execution time of 10,000 ms.
Query only fields you need.
If you know in advance which fields you need, query just those. Don't use dynamic field lists if you can help it, because it will slow down your query time and execution time, increase memory usage, and generally slow things down-- significantly. It can also cause errors in situations that wouldn't occur without dynamic lists.
Never query inside a loop.
You'll probably read about this elsewhere, so I won't say much on it, but remember that you'll hit your limits with a lot less data if you do this. Using maps correctly usually means you won't be doing this anyways, because you'll know better.
Other than these simple guidelines, most other optimizations are more cosmetic than any serious performance gains, and you'll pick those up as you go along.