How to represent foreign key in an ER diagram?
ER Diagrams were originally used only to represent the ER model.  The ER model does not use foreign keys to represent relationships.  It uses lines between boxes.  The lines have some kind of indicator for cardinality at either end or both ends.  Sometimes, a relationship will be indicated separately by a diamond.  

Today, more than half of the ER diagrams floating around are really diagrams of a relational model, and not of an ER model.  A relational model has the foreign keys included in the tables, and these serve to implement the relationships which the ER model identifies.  And a relational model will have an extra table, often called a "junction table" between two entity tables that are linked by a many-to-many relationship.  This junction table contains two or more foreign keys.  

There are many ways to represent a relational model. Perhaps the simplest is the "Relationship Diagram" that MS Access can produce from a completed database.  This will be fairly complete, if the database builder has identified the foreign keys.  

There are many tools that are more sophisticated than MS Access for making diagrams on a larger scale.  Some of these are used before building the database.  Some are used after.