In computer programming, a singleton is a design pattern that restricts the creation of objects to only one instance. This means that there can be only one object of this type in existence at any given time. The idea behind this pattern is to provide a global point of access to data or functionality while still maintaining encapsulation and preventing multiple instances from being created.