Attributes are initialized in a constructor by assigning values to them using the self keyword. For example, self.name = name would initialize the name attribute of an object with the value of the name parameter passed to the constructor.