For most beginner broker accounts, you can sell a stock and buy the same or another stock the same day, but you cannot buy a stock and sell the same stock the same day. You need to hold any stock you buy over night and sell the following day. Best to call your broker and ask the specifics for your account.
I believe you have to wait until the transaction is settled. I think if you look around at pending transactions or something it will give you the date of settlement, usually about 4 or 5 days.
When you sell a security it takes 3 business days for the funds to clear. You can buy another security with unsettled funds, but you can't sell that security until the original clearance date. I did not know this when I started trading and was slapped with a 90 day restrictions where I could only buy with settled funds- not fun.
For this reason, it is best to have enough money on reserve or open a margin account, though I do not recommend it.
Google "free ride". You can buy shares in a new company but have to let funds settle from the prior trade before you can sell the new ones you bought.
Sold company A Settles in 3 days.
Bought company B immediately after selling company A. Cannot sell company B until company A settles. If you do, it is a free ride and you can get in the dog house.
put your crap in a margin account, and you can flip 3 times a week, and use the money immediately for another trade. more than 3 day trades in a five day period and you'll be restricted, unless you fund your account with 25k or more.