When you take a loss on a stock you sell you can use that loss to mitigate your taxes on your profits. However, if you purchase the same stock within 30 days of having taken a loss it is considered a 'wash sale' and your ability to take the loss is removed from that stock and moved to your cost basis for your second purchase.
Often easier and worth more to wait the 30 days unless you have confirmation that it is about to skyrocket.
If you want to learn more ivestigate 'wash sale'. That should tell you what you need to know.