How can I access/arrange elements in the {{ content }}?
You don't have to use {{ content }} only - this is a variable made up of all the renderable elements in the entity being rendered.

For instance, if you have 4 fields, Field A, Field B, Field C, Field D, you can dictate how/where they are output in the entity template like so, by rendering individually:

&lt;div class="section-main"&gt;
  {{ content.field_a }}
  {{ content.field_b }}
&lt;/div&gt;

&lt;h4&gt;{{ content.field_c }}&lt;/h4&gt;
&lt;p&gt;{{ content.field_d }}&lt;/p&gt;


The most common thing most people will encounter in theming will be the theming of fields and entities (like node). 

If you wanted the markup within the field, you'd create/edit the appropriate field-- template in your theme and move it there. Lets say you wanted to move the h4 into the Field C template:

field--field-c.html.twig:

{% for item in items %}
  &lt;h4&gt;{{ item.content }}&lt;/h4&gt;
{% endfor %}


Now anytime that field is rendered, it is wrapped with an h4 (per value, if it is a multivalue field - check field.html.twig for more info).

Then, back in the node template you remove the h4:

{{ content.field_c }}


The h4 is still in the page, it's just in the field template now. You can break it down any number of ways that is suitable for you.

Let's say you did a mytheme_node_preprocess in your themes mytheme.theme file and created some new variables for the node template. Now that you know how to break down the content variable, you can intersperse custom variables with that:

&lt;h1&gt;{{ title }}&lt;/h1&gt;

&lt;h2&gt;{{ content.field_subtitle }}&lt;/h2&gt;

{{ custom_var }}

{{ content.field_a }}

&lt;h6&gt;{{ custom_var_2 }}&lt;/h6&gt;

{{ content.field_b }}


and so on.

Here is a real example from a project of mine to demonstrate a little further:

node--collection.html.twig

{%
  set classes = [
    'node',
    'node--type-' ~ node.bundle|clean_class,
    node.isPromoted() ? 'node--promoted',
    node.isSticky() ? 'node--sticky',
    not node.isPublished() ? 'node--unpublished',
    view_mode ? 'node--view-mode-' ~ view_mode|clean_class,
    'hl__full-template__page-content',
    'hl__full-template__page-content--full',
    'hl__collection-details'
  ]
%}

&lt;article{{ attributes.addClass(classes) }}&gt;
  {{ title_prefix }}{{ title_suffix }}

  {% if node.field_featured_image %}
    &lt;div class="hl__collection-details__main-image"&gt;
      {{ content.field_featured_image }}
    &lt;/div&gt;
  {% endif %}

  &lt;section class="hl__rich-text"&gt;
    {{ content.body }}
  &lt;/section&gt;

  &lt;div class="hl__collection-details__columns"&gt;
    &lt;div class="hl__collection-details__divider"&gt;&lt;/div&gt;
    &lt;div class="hl__collection-details__how-to"&gt;
      &lt;section class="hl__rich-text hl__rich-text--small"&gt;
        &lt;h2 class="hl__comp-heading"&gt;Accessing These Materials&lt;/h2&gt;
        {{ content.field_how_to_use }}
      &lt;/section&gt;

      {% if view_records %}
        &lt;div class="hl__collection-details__how-to-button"&gt;
          {{ view_records }}
        &lt;/div&gt;
      {% endif %}
    &lt;/div&gt;
    &lt;div class="hl__collection-details__ctas"&gt;
      &lt;section class="hl__contact-list"&gt;
        &lt;div class="hl__contact-list__container"&gt;
          &lt;h2 class="hl__comp-heading "&gt;Contact&lt;/h2&gt;
          &lt;div class="hl__contact-list__items"&gt;
            &lt;section class="hl__contact-info"&gt;
              {% if node.field_contact_person.target_id %}
                {{ content.field_contact_person }}
              {% else %}
                {% include '@mytheme/misc/freeform--contact.html.twig' %}
              {% endif %}
            &lt;/section&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/section&gt;

      {% if node.field_call_to_action.target_id %}
        {{ content.field_call_to_action }}
      {% endif %}
    &lt;/div&gt;
  &lt;/div&gt;

  {% if node.field_related_collections.target_id or node.field_related_how_tos.target_id %}
    &lt;hr class="hl__section-divider" /&gt;
  {% endif %}

  {% if node.field_related_collections.target_id %}
    &lt;section class="hl__overlay-promo-grid"&gt;
      &lt;div class="hl__overlay-promo-grid__container"&gt;
        &lt;h2 class="hl__comp-heading hl__comp-heading--left"&gt;Related Collections&lt;/h2&gt;
        &lt;div class="hl__overlay-promo-grid__grid"&gt;
          {{ content.field_related_collections }}
        &lt;/div&gt;
        {% if node.field_see_all_collections %}
          &lt;div class="hl__overlay-promo-grid__see-all"&gt;
            {{ content.field_see_all_collections }}
          &lt;/div&gt;
        {% endif %}
      &lt;/div&gt;
    &lt;/section&gt;
  {% endif %}

  {% if node.field_related_how_tos.target_id %}
    &lt;section class="hl__staggered-type-list"&gt;
      &lt;div class="hl__staggered-type-list__list-wrapper"&gt;
        &lt;div class="hl__staggered-type-list__list"&gt;
          {{ content.field_related_how_tos }}
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/section&gt;
  {% endif %}
&lt;/article&gt;


The more you try things, the more you are going to learn. You cannot do any PHP in Twig templates, which is why that has to be deferred to preprocess functions in the theme file, custom field formatters etc that tell Drupal what to do with the data you are about to output.

edit: the {% if node.field_name.value %} lines are simply checking in the node object that the field has an actual value before we output markup and render the field for it. node and content are two separate things.