Jenny, there is customs and there is immigration (passport control). These are two different things, customs is easy (they just do random checks and you may not notice you have passed through customs), passport control can take time.
- The EU is a customs union, there is no customs between EU member countries.
- The Schengen Area is a passport union, there are passport no passport checks between Schengen countries.
Most countries in Europe are in both the EU and Schengen, so there are no customs or passport controls, nothing, zilch.
You can travel from Belgium to Portugal or to Finland without going through any checks.
But, there are some exceptions. The UK is in the EU but not in Schengen, so if you are taking a train between France and the UK you have to arrive 30 minutes early to go through passport checks before boarding the train.
Switzerland is in Schengen but not the EU, so there is customs but no passport checks. Though they only random check a very small percentage of train travellers.