In the case of DTD validation, the validation process is always closely associated with XML parsing; many XML parsers have an option to switch validation on or off, and if it is switched on, the parser will retrieve the DTD and validate the instance against it, typically "on the fly" during the parsing process.
XML parsers might come with your programming language (e.g. Java, C#, Python), or they may be free-standing third-party libraries. Some might be bundled with an operating system, but they aren't really part of the operating system.
In the case of XSD schema validation, the validator might be bundled as part of an XML parser as above, or it might be a separate component. So the parser might have an option to invoke schema validation on-the-fly during parsing, or there might be a free-standing validation utility. For example, in the Java world, the Xerces parser has options to invoke XSD validation, but there is also a schema validator in Saxon, which includes XSLT and XQuery processing but does not itself do XML parsing.
Interactive development environments ("editors") such as oXygen and Altova XMLSpy typically include an XSD schema validator; this might be one they have developed themselves (Altova) or a third-party product that they have integrated (oXygen allows you to choose between the Xerces and Saxon validators).