There is no tax liability until you sell the shares. If you make a profit, the profit is taxed based upon how long you held the shares. If you held them less than a year then they are taxed as ordinary income. They are taxed at the lower capital gains rate if you held them more than a year.
I seldom buy shares and sell them the same day. People who do this are called day traders. Their objective is to find a company's shares that are rising rapidly that day, buy them on the way up, and sell them before the market closes. Keep in mind that it takes 3 work days before the proceeds from that sale are credited back to you. Also keep in mind that you will pay a fee to the brokerage to buy them and then the same fee to sell them. Scottrade charges a flat fee of $7 per trade; Fidelity charges $7.95. Therefore, if you only purchase a few shares, your stock can go up a little but you could still lose money on the trade because of the brokerage fees. I am not familiar with the brokerage fees of other brokerage houses.
If you are going to day trade, you should speak to a broker to investigate the restriction on accounts that have been identified as a "pattern day trader". If you use the funds from a sale to purchase before the sale has been settled, then you can't sell the new shares until the settlement date of the original sale.
My holdings range from a few days old to almost a year old and I keep track of them constantly throughout the market day. Some days are just spent monitoring and other days I am actively adding to positions I already have, purchasing new positions, or reducing positions that I hold. Be prepared to do a lot of reading and research. Don't expect to get rich quick.
Most investors don't buy and sell that rapidly . the moral is to buy at a good price and sell for higher . that could mean holding the shares for months - years before you can make a well enough profit . " buy at a price and sell at a higher price " - warren buffet