They pull recent sales data on other homes around you. Then they compare your size, features and condition to those homes to decide whether you're better, worse, or fairly similar and suggest a list price based taking all of those factors into account.
If you're trying to do this yourself, it's difficult because sales prices aren't usually available to the public immediately. They're often months old (i..e outdated) before you see them. Additionally, you probably won't have access to all of the details and photos that are in the MLS to really compare your property to someone else's. Lastly, it's hard for most homeowners to objectively assess their own properties.