Click on an open ocean space near the target(s) you wish to attack. You will see two options. “Move Territory” and “Assault”. The latter temporarily relocates your base for thirty minutes, long enough to complete several attacks on one or more nearby targets. It also lets you return to your original location with a single click, by hitting the “Retreat” but-ton, which also instantly returns to your base any ships / fleets whether in transit or actively attacking a target. This can be used to prevent your ships from being destroyed if a superior force unexpectedly appears as they are attacking a target, or your base is attacked while your ships / fleets are away from it (or attacked by a superior force / player).
Notes: You can be attacked at home even if your base is elsewhere and engaged in an “Assault”, by using an item called the “Mirror of Truth” (you may occasionally see one of these for sale when using the “Market” building). If you are alerted to an attack while engaged in an “Assault”, but don't see any nearby attackers, this is probably the source of the problem.