Is a block changed programmaticaly with hook_block_view_alter cached? I have a lateral section which will be different for every page in my site, but the content is practically unaltered for every single page.

I had the intention of using hook_block_view_alter. I would create an empty block in the region, and would fill the content dinamically with PHP in a hook in a custom module.

Will the content be cached or should I better create different blocks for every single page and change the content only if the content changes?
hook_block_view_alter() isn't going to affect the cache settings for the block automatically, though you can find a way if you really want to as Molot points out below; typically you use hook_block_info_alter() to change the cache settings for a block:

function mymodule_block_info_alter(&amp;$blocks, $theme, $code_blocks) {
  $blocks['block']['my_block_id']['cache'] = DRUPAL_CACHE_PER_PAGE;
}


Here, DRUPAL_CACHE_PER_PAGE will cache your block for each page, which could be quite a bit better than not caching at all and creating the content dynamically for each page. If you need dynamic content every time, choose DRUPAL_NO_CACHE. Clear the block cache to make Drupal aware of your new settings.

But! If you are prepared to have a custom module to run alter hooks, consider writing a block from scratch. If you are going to have a custom block, I feel that it helps if it is impossible to accidentally delete in the Drupal UI. 

To implement a basic block you need hook_block_info and hook_block_view.

hook_block_info is where you tell Drupal that the block exists and how to cache it:

function mymodule_block_info() {
  $blocks['myblock'] = array(
    'info' =&gt; t('My Awesome Block'),
    'cache' =&gt; DRUPAL_CACHE_PER_PAGE,
  );
  return $blocks;
}


Next, hook_block_view does the work of generating the content. I find that assigning the content to a callback makes my code easier to read, but do what works for you. Using switch() makes it easy to add more blocks to your module later on. 

function mymodule_block_view($delta='') {
  $block = array();

  switch ($delta) {

    case 'myblock':
      $block['subject'] = t('My awesome block');
      $block['content'] = mymodule_some_function_to_build_the_block_content();
      break;

  }

  return $block;
}