Trading times
Shares of a given stock can be traded on any stock exchange in which a company is listed. Like you can buy Coke in Walmart or 7/11, but may be not in Homedepot.
This is important because at times the same stock can have different prices in different exchanges. You can actually at times make money by just buying in one exchange and selling in another. There are all pretty fine tune, toug.
There are stock exchanges in almost every country, the most famous is the NYSE or the New York Stock Exchange. They operate from 9:30 am to 4:00 pm.
Other stock exchanges are fully electronic like the NASQAT.
With the availability of digital trading, some stocks can be traded after hour:
The after-hours market trades are from 4:00 p.m. to 8:00 p.m. The pre-market are from 4:00 a.m. to 9:30 a.m.
These are times in New York.