It depends on the type of aspirator you have. Bulb-style aspirators should be cleaned internally by squeezing hot, soapy water into the interior, then shaking vigorously. Repeat with clean water several times, then prop the aspirator up so it can drain completely.
Some aspirators are designed with dishwasher-safe pieces, while others should be sterilized in boiling water. Make sure to check manufacturer instructions for properly cleaning your nasal aspirator.