Piles / Hemorrhoids are swollen , enlarged veins that form inside and outside of your anus and rectum. They can be painful , uncomfortable and can cause rectal bleeding.
They are broadly classified into 2 types :

EXTERNAL HEMORRHOIDS :
Swollen veins form underneath the skin around anus. They can be itchy , painful and can cause bleeding sometimes.
INTERNAL HEMORRHOIDS :
Swollen veins form inside the rectum
They can cause bleeding and usually are not painful.