The UK is scheduled to leave the EU at 11 PM on the 31st of October. It's 11 PM because that is midnight in Central European Time which is what the EU mostly uses for administrative purposes.
That means that from that time onward, the UK will not be a member of the European Union. After that time it is a "3rd country", just like any other which has no association with the EU.
However, both the UK and EU have agreed to extend some special arrangements beyond that date. The EU has stated that it will facilitate travel for UK citizens on a special basis (not requiring a visa). The UK will also try to guarantee EU citizen's rights regarding their right to live in the UK, and has created the Settlement Scheme to that end. The current advice is that the scheme will run until December 2020 and that EU citizens have until then to apply, although if they want to travel in and out of the UK during that time it could be problematic for them, and the scheme is experiencing some severe issues.
More over it appears that freedom of movement will not end in October, as there is no legal means to do so. What this means in practice is currently somewhat unclear.
Border controls are also unclear. The UK's current position is that it will not have border controls with Ireland and will so some unspecified thing to keep traffic flowing though UK ports. However, controls would need to be placed on the EU side and the ports can only move vehicles and goods when ships have offloaded them on the EU side and returned, so that may be optimistic.
Re-joining the EU is possible but the terms are unclear. The UK could make a normal application to join, but it seems likely that there would be some kind of fast-track option available as economic, legal and social alignment is already in place and could be restored quickly. Personally I think the option of re-joining would only be offered if some change was made to prevent a repeat of the current debacle, such as deleting Article 50 or heavily reforming it.