SD cards are classified according to sequential write speed. Class 4 means minimum 4MB/s sequential write speed. Class 10 means minimum of 10.
Most high end cards support far in excess of Class 10 now.
Then there is the UHS number, which is a more comprehensive speed requirement. UHS-1 (written as U1 on the card has a minimum 10MB/s sequential write speed, and UHS-3 has a minimum 30MB/s, however the testing is more rigorous so something that is class 10 is not necessarily UHS-1. Under the hood, the controller in your device will have a maxmimum rate it can communicate with a card, so an old camera may not necessarily get a speed boost from a faster card beyond its own capability.
Sequential write speed is not the whole story with cards, as it can conceal the fact that random write speed can be orders of magnitude slower than this. If you have a fragmented card (one that is near full and might have had photos and clips randomly deleted from it then the card may struggle to make writes very sequential. In the absense of knowing the random write speed of a card, it makes sense to overcater on the sequential write speed based on the logic that as sequential write speed scales up, so will random write speed, all else being equal.
Note that all flash drives have a fast read speed, so you usually don't need to worry about this. For marketing purposes the often put read speed prominently on the packaging, which is misleading. It may be quoted as, say, 45MB/s, 90MB/s or 140MB/s (which can be hard to reach practically due to the host controller, but nonetheless the card could support it). Read speed isn't very important for photographing/filming, so let's not get confused by talking about it here.
For write speed, aim for about triple the bitrate of the video you're filming. Remember than a 24Mbit/s video requires 3MB/s transfer, as a Byte is 8 bits. So for filming 24Mbit/s video choose a class 10 card at minimum, as that's approximately triple the video rate. If you're doing higher bitrate video go for a UHS-3 card. Your camera's manual will tell you what bitrate it uses for each video mode.
For photos, it only becomes relevant if you do burst photography of more then around 7 shots in a burst, because before that the camera is able to buffer the images and write them to the card later. If you going to do longer bursts, class 10 cards or better will perform decently. Remember that even with an infinitely fast card, the camera is still likely to take them at a lower rate once the buffer is exhausted, so if it can do, say, 7 shots per second for the first 7 shots, subsequent shots in the same burst may still be slower ie 4-5 shots per second no matter how fast the card is. So if you get a class 10 card and find this, don't assume that a faster card can better it. For any decent camera it should state in the manual what its maximum burst rate is both for the first (buffered) shots and subsequent shots.