Yes, easy.
Typical single switch installation:
1: TURN OFF POWER. Remove relevant fuse or trip the breaker in your consumer unit.
2: Remove two external screws and pull the switch out of the wall
3: There are likely two wires at the switch (Live supply, Switched Live to lamp), plus probably an earth which may be attached to the wallbox itself, or to a very visible metal strip on the back of the switch. TEST the live wires to ensure they are not live (i.e. you flipped the right breaker or removed the right fuse).
4: Unscrew holding screws and disconnect two wires.
5: Loosen the holding screws in the new switch and offer it to the hole. Connect the two wires. It typically doesn't matter which goes where, but if they are similarly labelled on the old and new switches, connect them the same way. Tighten the holding screws.
6: Push the switch into the hole and replace the two external screws.
7: Power on and test.
If there are any more wires (beyond two and earth) then this may be a two-way setup and then the polarity will matter. In such a case, the Live supply wire needs to go to the "common" terminal. The other two can be either way around. Inspect the positions of cables in the old switch to establish which is the common (Live supply) cable.