If you buy a stock (US) then you can sell it any time that you want whether it be minutes or months later.
In Cash Account, you can make as many trades as you want with the money available in your account but once you have gone through it, you must wait until settlement until the cash is available for more trading (T+2).
In a margin account, you can borrow money from broker to purchase stock. Reg T initial margin is 50% though brokers can require higher initial margin. Some securities have margin restrictions (leveraged ETFs, stocks below $5).
If you make more than 3 day trades (options and equities) in a rolling 5 business day period in a margin account, provided the number of day trades is more than six percent of the total trading activity for that same five day period then you are considered to be a Pattern Day Trader. Then, you must maintain a minimum equity of $25k in a margin account on any day that trades are made and must be in the account prior to the day trading. If the account drops below $25k, no day trades will be allowed until the account is restored to the $25k minimum equity level.
A PDT is allowed intraday to trade 4 times the maintenance margin excess in the account as of the close of business of the previous day but must revert to the standard 50% margin by the end of the current day. Brokers have the right to set more restrictive levels of margin (less than 4:1).