Q1)If any automated bot visits my domain will Google Analytics consider it as traffic?
What all factors does the Google Analytics consider to be legit traffic?
Q2)If a user visits xyz.domain.com ,Does Google Analytics consider that it visited domain.com?
Q2 - This depends on how you have configured Google Analytics. You can configure your snippet on the setup of the profile to include subdomains (such as xys.domain.com) or to treat them as a separate site. Note you would have to setup another profile then to track xyz.domain.com explicitly.