Software transactional memory is a method of handling concurrency in multithreaded systems. It aims to make memory, which is shared by threads, act in a transactional way like a database. This removes the need for explicit locking which is error-prone and can lead to deadlock.