I have a website that is hosted on a free website hosting program and the website ends with the prefix www. website .x10hosting.com , will Google index this site or will it leave it out because of this prefix. My other question is does Google index free websites?
Yes they do Google also indexes subdomains of a normal domain so why wouldn't they do that with free hosting? There are also plenty of Geocities (forgot the exact name) pages indexed.
Yes, your page will be indexed, but it will take a long time if you use the form Google provides. Instead you should try getting quality backlinks and your website will be indexed faster.