Finding out that a user is using a VPN service provider isn't that difficult. Most of them have static IP addresses for their exit gateways, so it could just be using a list of known IP addresses to identify VPNs. And even when they don't have a list, a simple reverse DNS lookup might tell them that the IP has a hostname which is obviously a VPN provider and not one assigned by a normal internet service provider.
Deanonymizing a VPN user, however, can be more of a challenge, because most VPN services are designed especially to prevent this. Possible attack vectors are browser fingerprinting and talkative browser plugins which say more about the user than they should.
Given that the VPN headers around each packet will take up space and then disappear, they could be looking at packet size vs MTU to come up with a way of guessing (it would be a wild guess) that the user is behind a VPN because their packets are consistently smaller than other streams.
An even wilder guess would be that they are looking at round trip time (more precisely, how long from when a tcp ack is sent to when the next packet returns). Most computers are fast enough to turn around in microseconds. So for a given host (single IP sending requests) if some/all users are behind a vpn that really leads off to distant parts of the world, the variation in RTT will be huge (120ms for some, 30 ms for others, etc) which can form a fingerprint of who is unique and what might be a VPN vs just a NAT (where there are many users but the RTTs are almost identical.)
In general you will not be able to know if someone is coming from a VPN.
You may be able to find some IP ranges of some companies that offer VPN, but this information is not going to be readably available and will become stale very quickly. Even if you mange to find a good list and keep it up to date it will never be comprehensive. When working for a multinational I could choose to route my traffic through anyone of their offices. Any individual with a internet connection could offer VPN services to their friends. If you are trying to guess location by IP address you will also need to try and detect TOR users, or black list all TOR exit nodes.
Also note some ISP's offer IP addresses that are not correctly geo-located, this can lead to false positives and false negatives.