(2-part post):
Stage 1 (Pre-acceptance):
If you discover a fault with a laptop shortly after purchasing it (i.e. while you're still 'trying it out'), then you're deemed not yet to have 'accepted' the purchase. You can demand a full refund of your money (or accept a repair or replacement if that better suits your needs).
Stage 2 (Post-acceptance up until 6 months after purchase):
If a problem develops due to an inherent fault (i.e. something which was actually wrong at the time of purchase, such as the use of poor quality components or poor workmanship) the retailer is obliged to repair or replace the laptop. (You can specify which of those options you'd prefer but the retailer can substitute the alternative option on the grounds of economic viability). Unless there is clear evidence to the contrary (such as the tyre marks of the bus which ran over your laptop!) there's an automatic legal assumption that any problem must be due to an inherent fault.