Logic programming is a programming paradigm based on formal logic where program statements express facts and rules about problems within a system of formal logic. It is primarily used in artificial intelligence and computational linguistics, with Prolog being one of the most well-known logic programming languages.