Temporal and spatial databases allow for the storage and querying of data that involves time or spatial aspects. Conventional databases only provide a snapshot of data, while temporal databases can maintain historical information and access past states of data. Spatial databases support spatial data types like polygons and spatial queries involving operations like overlap and distance. Key components of temporal and spatial databases are their data models, query languages, indexing structures like R-trees, and optimized algorithms for processing queries over time-series and geospatial data.